13 lines
328 B
C++
13 lines
328 B
C++
# include <iostream>
|
|
using namespace std;
|
|
double km2mile = 0.6214;
|
|
double ga2l = 3.875;
|
|
|
|
int main(){
|
|
double ga, mi, eu_rate;
|
|
cout << "The usage of oil (L) per 100 km: ";
|
|
cin >> eu_rate;
|
|
double us_rate = km2mile * ga2l / eu_rate;
|
|
cout << "Every gallon, the driver can drive " << us_rate << " mile(s)" << endl;
|
|
return 0;
|
|
}
|