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 zhtsuc at 2006-04-01 13:51:15 on Problem 1005
In Reply To:我怎么错啦?请各位兄弟姐妹帮我看看 Posted by:slience at 2006-04-01 12:49:21
> #include <stdio.h>
> #include<math.h>
> int main()
> {
> 	int m,i;
>     int n[10]={0};
> 	float x,y;
> 	double area;
> 	do
> 	scanf("%d",&m);
> 	while(m<=0);
> 	for(i=0;i<m;i++)
> 	{
> 		scanf("%f%f",&x,&y);
> 		if(y>=0)
> 		{
> 		area=3.14*x*x;
>         area=area/100;
> 	    n[i]=(int)area;
> 	    if(area>n[i])
> 		n[i]=n[i]+1;
> 		printf("\n");
> 		}
> 	}
> 	for(i=0;i<m;i++)
> 		if(n[i]!=0)
> 		printf("Property %d: This property will begin eroding in year %d.\n",i+1,n[i]);
>     printf("END OF OUTPUT.\n");
> 	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