A toll bridge charges $3.00 for passenger cars, $4.00 for buses, $6.00 for trucks under 10,000 pounds, and $10.00 for trucks over 10,000 pounds. The problem is to write a program using an if construct...



A toll bridge charges $3.00 for passenger cars, $4.00 for buses, $6.00 for trucks under 10,000 pounds, and $10.00 for trucks over 10,000 pounds. The problem is to


write a program using an if construct to compute the toll. Use interactive input if


it is available. The input data consists of first the letter C, B, or T for car, bus, or


truck, respectively. Either uppercase or lowercase letters are permitted. If the class


is T (truck), then prompt the user for another character that is either “


less than 10,000 pounds) or “>” (meaning greater than 10,000 pounds). The following are sample executions:



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here