How to use C code to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below : Age Range                    Rate ( per hour)(RM) 0-20                                                1.00 21-50                                              3.50 Above 50                                        2.00 (Figure 2) In your program, you have to make use of THREE(3) different defined constants for the value  of rate per hour and declare the necessary variables.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.4: Program Input Using Cin
Problem 12E
icon
Related questions
Question

Q1) How to use C code to write a C program segment that prompts and accepts the age and number of hours the customer has spent in the “FUNNY Theme Park”. Then, displays the charges based on the rates shown in Figure 2 below :

Age Range                    Rate ( per hour)(RM)
0-20                                                1.00
21-50                                              3.50
Above 50                                        2.00

(Figure 2)

In your program, you have to make use of THREE(3) different defined constants for the value
 of rate per hour and declare the necessary variables.

Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning