//3.7_5.cpp 耗油量/里程
# include <iostream>
int main()
{
using namespace std;
double mile=0,gallon=0,L=0;
cout<<"Enter the mileage: ";
cin>>mile;
cout<<"Enter the Fuel consumption: ";
cin>>gallon;
L = mile / gallon;
cout<<"Your a gallon of mileage is "<<L<<" mile."<<endl;
return 0;
}
/*
输出结果:
Enter the mileage: 888888888
Enter the Fuel consumption: 555555
Your a gallon of mileage is 1600 mile.
Press any key to continue
*/
留意转换,这个我写代码时候,考虑了良久