Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

PANGASINAN STATE UNIVERSITY

Asingan, Pangasinan

Bachelor of Science in Information Technology

Name: John Kelvin A. Macadangdang Score:


Course/Year: BSIT - 3 Date Submitted:

ACTIVITY 3

PROBLEM 1: The president of Living Daylights Village homeowners’ Association


noticed that the number of cars per family in their village ranges from 2 to 10 cars. There
are exactly 400 family residents in that village. Write a program that would input the
number of cars of each family. Program must then output the following:
a. Count of families with at least 4 cars.
b. Count of families with exactly 10 cars.
c. Count of families with a t most 3 cars/
d. Total number of cars.
e. Average number of cars.

CODE: (Encode the program codes)

OUTPUT: : (Screenshots)

IPT 101 INTEGRATIVE PROGRAMMING AND TECHNOLOGIES


PROBLEM 2: Make a program to enter 12 monthly sales of XYZ enterprises for the
year 2005 and then output the following:
f. total sales of the year
g. quarterly sales of the year
h. semi-annual subtotals
Output the total using the format below

XYZ Enterprises

Sales Total for the Year 2005

Total for the Year: (Display the total here)

Quarterly Subtotal

1st Quarter: (Display the total here)

2nd Quarter: (Display the total here)

3rd Quarter: (Display the total here)

4th Quarter: (Display the total here)

Semi-Annual Subtotal

1st Semi-Annual: (Display the total here)

2nd Semi-Annual: (Display the total here)

CODE: (Encode the program codes)

OUTPUT: : (Screenshots)

IPT 101 INTEGRATIVE PROGRAMMING AND TECHNOLOGIES


PROBLEM 3: Write a program that would accept a series of integer numbers
terminated by a 0 sentinel. The program should output the corresponding word
equivalent of each entry. The program should also validate the number (must be between
1 and 999) and if invalid, display the message “OUT OF RANGE”. For example, if the
input is 832, program must output “EIGHT HUNDRED THIRTY TWO”, If input is 78,
output must be “SEVENTY EIGHT”. If input is 1000 output must be “OUT OF RANGE…”

CODE: (Encode the program codes)

OUTPUT: : (Screenshots)

IPT 101 INTEGRATIVE PROGRAMMING AND TECHNOLOGIES

You might also like