0% found this document useful (0 votes)
43 views

Write A Program That Reads in Three Whole Numbers and Outputs The Average of The Three Numbers

This document contains 17 programming problems that involve writing programs to: 1) Calculate the average of 3 numbers. 2) Determine student admission based on GPA and test scores. 3) Calculate payroll including gross pay, taxes, and net pay. 4) Compare number of college credits between two people. 5) Display initials with periods between each.

Uploaded by

Uno Uno
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

Write A Program That Reads in Three Whole Numbers and Outputs The Average of The Three Numbers

This document contains 17 programming problems that involve writing programs to: 1) Calculate the average of 3 numbers. 2) Determine student admission based on GPA and test scores. 3) Calculate payroll including gross pay, taxes, and net pay. 4) Compare number of college credits between two people. 5) Display initials with periods between each.

Uploaded by

Uno Uno
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Write a program that reads in three whole numbers and outputs the average of the three numbers

2. Write a program for a colleges admissions office. Create a variable to store a students numeric high
school grade point average and an admission test score. Print the message Accept if the student has any
of the following.
a. A grade point average of 3.0 or above and an admission test score of at least 60.
b. A grade point average below 3.0 and an admission test score of at least 80.
c. If the student does not meet either of the qualification criteria, print Reject. The class name is
ADMISSION.

3. Write a program that stores an hourly pay rate and hours worked. Compute gross pay (hours times rate),
withholding tax, and net pay (gross pay minus withholding tax). Withholding tax is computed as a
percentage of gross pay based on the following:
a. GROSS PAY WITHHOLDING PERCENTAGE
b. Up to and including 300.00 10
c. 300.01 and up 12
d. The class name is payroll.

4. WAP that compares the number of college credits you have earned with the number of college credits
earned by a classmate or friend. Display an appropriate message to indicate whether your classmate
earned more, fewer, o the same number of credits as you. Display the number of college credits whether
the if statement is true or not.

5. WAP that declares variables to hold your initials. Display the three initials with period following each
one, as in H.C.M.D.

6. WAP that will accept for your tuition fee and book fee. Compute and display the sum.

7. WAP that prompt the user to accept time in seconds. Compute and display time in HH:MM:SS.
8. WAP that will let you compute for shapes area . Let the user accept for a character, If the user input a
prompt for the needed data and compute for the area of rectangle, if b area of triangle, c for circle and
d for trapezoid. Used the below formula.

a. Rectangle ---- Area = Length X Width


b. Triangle---- Area = 1/2 of the base X the height
c. Circle --- A = pr2 p = 3.14

d. Trapezoid ----

9. WAP that accepts a String. Count and display the number of vowels and consonants.

10. WAP that will let you accept N times integer number . compute and display the average of all odd
numbers and , sum of all even numbers.

11. WAP that let the user to accept your secret number. Your program will prompt your classmate to guess
the number and display an appropriate number.

12. Write a program that uses any kind of loop structure.


a. Prompt them to input two integers: FirstNum and SecondNum. (FirstNum must be less than
SecondNum).
b. Output all odd numbers between FirstNum and SecondNum inclusive.
c. Output the sum of all even positive numbers between FirstNum and SecondNum.

13. Write an application that asks the user to enter an IQ score. Determine If the score is the number less than
0 or greater than 200, issue an error message, otherwise, issue an Above Average, Average , Below
Average message for scores over, at, or under 100 respectively.
14. WAP that will ask for a number. Use the number as your range starting from 0, display the square of each
number in another line after each.

15. WAP that will accept your grades from prelims to. Compute and display your average where in prelim to
prefinals takes 20 % each and 40% for finals.

16. WAP that will accept an integer number. Display series of * base on your inputted number.

a. EX.
b. Number :3
c. ***
d. **
e. *

17. WAP that will ask the user to enter N times number. Determine all negative and positive numbers.

You might also like