标签:
#include <stdio.h> #include <stdlib.h> #define pi 3.1415926 int main() { float dia,tim; int rev,count=0; while(scanf("%f%d%f",&dia,&rev,&tim)!=EOF) { float dis,MPH; if(rev==0) break; dis=pi*dia*rev/63360; tim/=3600; MPH=dis/tim; printf("Trip #%d: %.2f %.2f\n",++count,dis,MPH); } return 0;; }
标签:
原文地址:http://www.cnblogs.com/gabygoole/p/4498677.html