Question
Procraming C: The problem is this: A traveling salesman is reimbursed at 55 cents per mile. When he leaves on a trip he writes down
Procraming C: The problem is this: A traveling salesman is reimbursed at 55 cents per mile. When he leaves on a trip he writes down his odometer reading and when he is done with the trip he writes down the reading again. At his home computer he enters these two numbers and the program you have written tells him how much to report on his expense account. Note: The algorithm for this requires more than a single math operation.
The interaction with the program should look something like this: (Note the formatting of the doubles with specific decimal places.)
MILEAGE REIMBURSEMENT CALCULATOR
Enter beginning odometer reading => 13505.2
Enter ending odometer reading => 13810.6
You traveled 305.4 miles.
At $0.55 per mile, your reimbursement is $167.97
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started