The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Cab Fare
A cab company charges $3.50 on entry into the cab, and an additional $2.25 for each mile for the first 10 miles. The fee for per mile after the first 10 miles is $1.50. Â Design a modular program that reads miles traveled from the user and displays the bill. Assume that users will enter whole numbers.
Â
If user entered 6, then the bill will be $17 ($3.50 + 6 * $2.25).
The first term ($3.50) is entry fee. The second term is the fee for 6-mile.
Â
If user entered 15, then the bill will be $33.50 ($3.50 + 10 * $2.25 + (15-10)*1.5).
The first term ($3.50) is entry fee. The second term (10 * $2.25) is the fee for first 10 mile. The third term ((15-10)*1.5) is the fee for remaining miles.
Â
Hint: This has to be a modular program. You should have three modules. The first one will get user input. The second module will calculate the bill. Third module will show the bill.
Hint: You might consider using named constants.
Â
You should submit pseudocode.
Â
Â
CISK 502 – Spring 2016– Quiz 2
Cab Fare A cab company charges $3.50 on entry into the cab, and an additional $2.25 for each mile
for the first 10 miles. The fee for per mile after the first 10 miles is $1.50. Design a
modular program that reads miles traveled from the user and displays the bill. Assume
that users will enter whole numbers. If user entered 6, then the bill will be $17 ($3.50 + 6 * $2.25).
The first term ($3.50) is entry fee. The second term is the fee for 6-mile. If user entered 15, then the bill will be $33.50 ($3.50 + 10 * $2.25 + (15-10)*1.5).
The first term ($3.50) is entry fee. The second term (10 * $2.25) is the fee for first 10
mile. The third term ((15-10)*1.5) is the fee for remaining miles. Hint: This has to be a modular program. You should have three modules. The first one
will get user input. The second module will calculate the bill. Third module will show the
bill.
Hint: You might consider using named constants. You should submit pseudocode.
**************************************************************************
-----------