poj 1665 Biker's Trip Odometer

来源:互联网 发布:excel数据管理软件 编辑:程序博客网 时间:2024/06/02 04:29

   简单得不能再简单的题,看看题就能秒解的。

 

#include<cstdio>#include<cstring>#include<iostream>using namespace std;const double pi = 3.1415927;int main(void){    double t,d;    int r;    int vv = 0;    while(scanf("%lf %d %lf",&d,&r,&t)!=EOF)    {       if(r==0)        break;        d /= (5280*12);       double s = pi*d*r;       double v = s*3600/t;       printf("Trip #%d: %.2lf %.2lf\n",++vv,s,v);    }    return 0;}