Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:他垂头丧气的说:"多好的程序啊!" 就是过不了!!!!

Posted by 810974380 at 2009-08-21 14:52:39 on Problem 1665
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator