| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:poj 1665 瞬间刷之In Reply To:poj 1665 瞬间刷之 Posted by:zihuacs at 2010-08-23 17:18:14 #include <stdio.h>
#define p 3.1415927
int main ()
{
double d,t,distance,speed;
int r,n=0;
while(scanf("%lf %d %lf",&d,&r,&t)==3){
if(r!=0)
{
distance=d*p*r/12/5280;
speed=distance/t*3600;
n++;
printf("Trip #%d: %.2lf %.2lf\n",n,distance,speed);
}
if(r==0)
break;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator