hdu1038

2018-06-04 11:06:05 浏览数 (1)

#include <stdio.h> #define P 3.1415927 #define toFeet(x) x/12.0 #define toMiles(x) x/5280.0 int main(){ double diameter;//直径 int revolutions;//转数 double time;//时间 double s; int count=1; while(scanf("%lf%d%lf",&diameter,&revolutions,&time),revolutions){ time/=3600; diameter/=63360; s=diameter*P*revolutions; printf("Trip #%d: %.2lf %.2lfn",count ,s,s/time); } }

0 人点赞