CAR TYPE: | COST |
1 : | $5 |
2 : | $6 |
CAR TYPE: | COST |
1 : | $4.5 |
2 : | $4.5 |
Suppose, TWO people in the family are crossing the bridge TWICE per day (to go to work and come back from work) and the payment is required in both directions. Write a program that reads car type and EZ pass indicator for each family member and calculates the total cost of work commute per family. Car type could be 1 or 2, 1 for regular car and 2 for track or bus, and EZ pass indicator, that could be 0 ( no ez pass) or 1 (there is ez pass). ASSUME THE INPUT IS VALID!
Example: Input: 1 1 2 0 Output: 21 dollars (explanation: one way cost 10.5 = 4.5+6, and both ways will cost 10.5*2 = 21 dollars)
Example 1: input (price and category for each item): 32.50, 1, 12.99, 2, 3.49, 3 Output: 31.76 (explanation: 32.5 received 15% discount, 12.99 received 10% discount, and 3.49 received 30% discount. The total after discount is taken is 41.76 dollars. Since this is over 40 dollars, an additional 10 dollars off is applied and the final total is 31.76)
Example 2: input: 15.99, 2, 10.99, 1, 1.99, 3 Output: 25.13
Write a program that reads number of credits student took so far and the 3-digit course number student would like to take. The
program
prints
eligibility message for the student.
Assume that input is VALID
Use the following rules: