Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program 1 Basic: Gasoline Goal: In this program, you will convert gallons of gasoline into several other measures. For this, we will use the following
Program Basic: Gasoline
Goal:
In this program, you will convert gallons of gasoline into several other measures. For this, we will use the
following conversions:
gallon liters
barrel of oil produces approximately gallons of gasoline
FYI: That one barrel of oil is equivalent to gallons
gallon of gasoline produces approximately pounds of when burned
gallon of gasoline produces approximately BTU, while gallon of ethanol produces
approximately BTU
HINT: Set up a proportion to figure out how many gallons of ethanol is equivalent to
gallon of gasoline
gallon of gasoline costs $
Specifications:
Ask the user "How many gallons of gasoline?" and accept the input as a float
Output the results of the conversions with the specified precision:
How many liters of gasoline this represents decimal places
How many barrels of oil are required to produce the gasoline decimal places
How many pounds of the gasoline produces when burned decimal places
How many gallons of ethanol is energy equivalent to the gasoline decimal places
How much the gasoline will cost at the pump decimal places
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