13 lines
294 B
C++
13 lines
294 B
C++
# include <iostream>
|
|
using namespace std;
|
|
|
|
int main(){
|
|
double ga, mi;
|
|
cout << "The usage of oil (Gallon): ";
|
|
cin >> ga;
|
|
cout << "The miles you drive: ";
|
|
cin >> mi;
|
|
double mi_per_ga = mi / ga;
|
|
cout << "Every gallon, the driver can drive " << mi_per_ga << " mile(s)" << endl;
|
|
return 0;
|
|
}
|