没想到做了快500道题,还留下个这么水的,残念……
做这题唯一的收获就是知道了一英尺是12英寸,一英里是5280英尺。
#include <iostream>
using namespace std;
const double pi=3.1415927;
int r,i;
double dis,d,s,t;
int main() {
i=0;
while (cin >> d >> r >> t && r) {
i++;
dis=d*pi*r/12/5280;
s=dis/t*3600;
printf("Trip #%d: %.2lf %.2lf/n",i,dis,s);
}
//system("pause");
return 0;
}