Write a program to assist in monitoring the gasoline supply in a refinery storag
ID: 3639420 • Letter: W
Question
Write a program to assist in monitoring the gasoline supply in a refinery storage tank. Your program should alert the supervisor when the supply of gasoline in the tank falls below 10% of the tank’s 80,000-barrel storage capacity. The supervisor is accustomed to dealing with the contents of the tank in terms of a number of barrels. However, the pump used to fill tanker trucks gives its measurements in gallons, so your program will need to do the necessary conversions. The petroleum industry’s barrel equals 42 gallons. The program should first request that the operator enter the amount of gasoline currently in the tank. Then prompt the user to input the number of gallons pumped into a tanker and update the number of barrels still available. When the supply drops below the 10% limit, issue a warning and end the program.SAMPLE RUN
Number of barrels currently in tank => 8500.5
8500.5 barrels are available.
Enter number of gallons removed => 5859.0
After removal of 5859.00 gallons (139.50 barrels), 8361.00 barrels available.
Enter number of gallons removed => 7568.4
After removal of 7568.40 gallons (180.20 barrels), 8180.80 barrels are available.
Enter number of gallons removed => 8400.0
After removal of 8400.00 gallons (200.00 barrels), only 7890.80 barrels are left.
****WARNING****
Available supply is less than 10 percent of tank’s 80000.00-barrel capacity.
Explanation / Answer
#include using namespace std; int main() { float n, n2, t; cout>n; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.