CS 1713 Practice Problems #2

Students are asked to code the following table:
Number Of passengers Yearly fee
< 2 $100
2 - 10 $300
11 - 20 $500
> 20 $1000

All of the solutions are wrong! In each case, draw a flow chart of the solution and find at least one error in each proposed solution. Fill in the following table:

passengers Sol #1 fee Sol #2 fee Sol #3 fee Sol #4 fee Sol #5 fee Sol #6 fee
1
           
2
           
5
           
10
           
11
           
15
           
20
           
21
           


Last revision: August 19, 2002 at 4:15 pm