I have to write a C++ function named MPG which returns the number of miles a car can travel with one gallon of gasoline. The function should have three parameters: the size of gas tank in gallons, number of miles traveled, and gasoline left in tank in gallons.
this is what I got
void MPG ( char sizeoftank, char number of milest, char gasleftintank)
{
return sizeoftank * numberofmilest
}
is it right? if not can show one give me a soultion