Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. (TCOs 4 and 8) A health club charges monthly membership fees as follow. Child

ID: 669854 • Letter: 3

Question

3. (TCOs 4 and 8) A health club charges monthly membership fees as follow.
Child (18 and under)              $15 per month
Adult (19–64)                         $25 per month
Senior (65 and over)               $20 per month

Write a pseudocode algorithm that will input the customer’s age and number of months, and print the monthly rate and total amount to be charged. Use structured pseudocode as demonstrated in the lectures for code, ensure that all variables are declared, prompt the user for the appropriate input, and display a meaningful output message. Make sure that the months are greater than 0 and the age is greater than 0. (Points : 10)

Explanation / Answer

int age,months

do

print "enter age greater than 0"

read age

while (age <= 0)

do

print "number of months greater than 0"

read months

while (months <= 0)

if(age <= 18

print "per month = 15 and amount =" 15*months

else if(age >= 19 and age <=64 )

print "per month = 25 and amount =" 25* months

else

print "per month = 20 and amount =" 20*months

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote