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:他垂头丧气的说:"多好的程序啊!" 就是过不了!!!!In Reply To:他垂头丧气的说:"多好的程序啊!" 就是过不了!!!! Posted by:laihang at 2004-12-24 16:32:37 变量 c 声明为 浮点型!!! #include<stdio.h> #include<stdlib.h> #define pi 3.1415927 float a,c,res,ans;int b,sign=1; int main() { while(scanf("%f%d%f",&a,&b,&c)) { if(b==0) break; res=pi*a*b/5280/12; ans=res/c*3600; printf("Trip #%d: %.2f %.2f\n",sign,res,ans); sign++; } system("pause"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator