算一下路程和速度...
1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 const double p=3.1415927; 5 double dia,tim,dis,sped; 6 int rev; 7 int main() 8 { 9 int k=1; 10 while(cin>>dia>>rev>>tim,rev) 11 { 12 dia/=12*5280; 13 dis=dia*p*rev; 14 sped=dis/tim*60*60; 15 printf("Trip #%d: %.2lf %.2lf ",k++,dis,sped); 16 } 17 }