cpp_primer_plus/ch03/06.cpp
2022-08-23 23:01:08 +01:00

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;
}