Answer:
See explaination
Step-by-step explanation:
Function DrivingCost(float drivenMiles, float milesPerGallon, float dollarsPerGallon) returns float cost
float dollarsPerMile
//calculating dollars per mile
dollarsPerMile=dollarsPerGallon/milesPerGallon
//calculating cost
cost=dollarsPerMile*drivenMiles
Function Main() returns nothing
//declaring variables
float miles_per_gallon
float dollars_per_gallon
//reading input values
miles_per_gallon = Get next input
dollars_per_gallon = Get next input
//displaying cost for 10 miles
Put DrivingCost(10,miles_per_gallon,dollars_per_gallon) to output
//printing a blank space
Put " " to output
//displaying cost for 50 miles
Put DrivingCost(50,miles_per_gallon,dollars_per_gallon) to output
Put " " to output
//displaying cost for 400 miles
Put DrivingCost(400,miles_per_gallon,dollars_per_gallon) to output