poj1665

#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;;

}

 

你可能感兴趣的:(poj)