[SOLVED] SOLVED:Calculates the price of gasoline pseudocode C

15.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

This program calculates the price of gasoline, both regular and ultimate when the number of gallons (a positive number) is entered by the user. The main program asks the user to enter the number of gallons they wish to purchase. After this, the program asks the user to input a “1” if they wish to calculate the total cost of regular gasoline or a “2” if they wish to calculate the total cost of ultimate gasoline. (For the purposes of this program, the price of regular gasoline been set at $3.14 per gallon. The price of ultimate gasoline has been set at $3.45 per gallon.) Once a user inputs a choice, either a “1” or a “2” the program calls the appropriate function and calculates the cost.

The formula for calculating the cost for regular is Set Regular = 3.14 * Gallons

The formula for calcluating the cost for ultime is Set Ultimate = 3.45 * Gallons

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.