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

谁帮我看看哪有问题啊

Posted by apple_pie at 2008-04-08 23:05:47 on Problem 1005
#include<stdio.h>
#include<math.h>
#define pi 3.1415927
int main()
{
	int n,i,year;
	float x,y;
	scanf("%d",&n);//输入测试数据组数
    while(n!=0)
	{
		    scanf("%f%f",&x,&y);//输入居住点坐标
            if(n<0||y<0)
				printf("ERROR\nPlease entre again:\n");//n与y输入不合理提示错误并重新输入
			else {
		         for(i=1;i<=n;i++)
				 {
					 year=(x*x+y*y)*pi/100+1;
	                 printf("Property %d: This property will begin eroding in year%d\n",i,year);
				 }
		         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