Question: The finction needs to be simple only a few simple steps similiare to these maybe gas per gallon = 3 . 0 0 # of

The finction needs to be simple only a few simple steps similiare to these maybe
gas per gallon =3.00
# of gallons in cor's tank=10
Cars efficiency in miles per gallon 15
function cost equals road trip parentheses car distance, gas, gallons, total miles, gas price,)
% totalCost is determined by dividing the total
distance by distance traveled on one tank multiplied by tank size and price per gallon.
Cost equals parentheses total miles divided by car distance parentheses times gas gallons times gas price;
Percent in order to round, we must multiply by 100, round, and then divide
cost =cost *100;
cost=ceil(cost);
cost=cost/100;
The finction needs to be simple only a few simple

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!