0
Write a program that calculates the number of km per gallon the car gets. Using c++
Kilometer per gallon- A car holds 16 gallons of petrol and can travel 350kilometers before refueling. Write a program that calculates the number of km per gallon the car gets.
2 Respostas
0
#include <iostream>
using namespace std;
int main(){
const int max_gallons=16, max_km=350;
cout<<"the number of km per gallon is "<<max_km/max_gallons<<" km/gal"<<endl;
}
0
Is it right