COSI 216: Programming in C++
The purposes of this assignment are to know
- how to use a nested if/else
statement
- how to set up a while loop
- how to accumulate a total price.
That is, initialize
total as zero and accumulate price as
total
= total + price;
A restaurant
charges a meal in the following rules:
If a child is under 13 years old, he/she pays 25 cents per year of
his/her age.
If a child is 13 or older and 17
or younger, he/she pays $6.
A senior who is 60 or older pays $6.
Regular adults pay $10.
Write a program to calculate the total payment for a family meal.
Basically, you should decide how
many memory boxes you need and draw a flowchart
before you type your codes into computers.

For example, a family has 6 members and the ages are 3, 7,
15, 35, 37 and 60.
You will have the following interface with user:
Enter
0 to terminate the program
| Age | Price | Total | |
| Enter age: | 3 | ||
| 0.75 | 0.75 | ||
| Enter age: | 7 | ||
| 1.75 | 2.50 | ||
| Enter age: | 15 | ||
| 6.00 | 8.50 | ||
| Enter age: | 35 | ||
| 10.00 | 18.50 | ||
| Enter age: | 37 | ||
| 10.00 | 28.50 | ||
| Enter age: | 60 | ||
| 6.00 | 34.50 | ||
| Enter age: | 0 | ||
You pay $34.50.