Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a computer program as a Win32 console application in C to calculate mileage reimbursement for a salesperson at a rate of $0.50 pet mile.

image text in transcribed
Write a computer program as a Win32 console application in C to calculate mileage reimbursement for a salesperson at a rate of $0.50 pet mile. Your program shall take two numbers as inputs, and then display the mileage and reimbursement amount. The name of your source file shall be p1 .c and that of your executable program shall be p1.exc. You program shall receive information from the user as the user types in two numbers to be processed. Y our program shall NOT print information to the screen except a. Your one-time output program heading and prompt shall be EE233 Spring 2017. P1: MILEAGE REIMBURSEMENT CALCULATOR Enter beginning odometer reading => 13503.2 Enter ending odometer reading => 13810.6 (The underlined numbers .0 the right, simulate user-entered numbers that are not part of the prompt itself) Your program shall accept two floating point numbers on two separate lines for a given calculation. The two numbers shall be of double data type. For a given pair of numbers, the printout shall be of the form You travelled 307.4 miles. At $0.50 per mile, your reimbursement is $153.70. (The numbers above are examples only. Replace them with what you calculate and be sure to follow each line of output with a newline.) Your output should be formatted exactly as the examples above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

3. How has Starbucks changed since its early days?

Answered: 1 week ago