Calculates the price of gasoline pseudocode C

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
Powered by