Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 : Fuel Efficiency Design a program that calculates the fuel cost per 1 0 0 miles and how far the car can go
Problem : Fuel Efficiency
Design a program that calculates the fuel cost per miles and how far the car can go with a full tank of gas.
Your program needs to acquire the following inputs from the user:
the number of gallons of gas in the tank
the fuel efficiency in miles per gallon
the price of gas per gallon
Your program needs to display the cost per miles and how far the car can go with a full tank of gas.
Extra requirements:
Your program must start with a display to the user what the program does.
When acquiring the information from the user, your program must give clear instruction on what data
the user should input and in what format whole number or floatingpoint number
When displaying any monetary amount, your program must prefix the amount with $ and keeps
exactly two digits after the decimal points.
The variable names must be descriptive to the quantity they represent.
The number of miles the car can go with a full tank of gas must be displayed as a whole number.
Your code for this problem
Run the code and insert the result in the following box.
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