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 90401304 at 2004-11-17 17:27:31 on Problem 1005
#include <stdio.h>
#include <math.h>

void main (){
	int N,i,z[444];
	float X,Y;
	double s,n;
	scanf("%d",&N);
    for(i=1;i<=N;i++){
         scanf("%f %f",&X,&Y);
		 if(Y>=0){
		    if(X!=0||Y!=0){
		         s=3.14*(X*X+Y*Y)/2; 
		         n=s/50;
		         z[i]=(int)ceil(n);
			}
         }
	   }
	
	for(i=1;i<=N;i++)
		printf("Property %d:This property will begin eroding in year %d.\n",i,z[i]);
	printf("END OF OUTPUT.\n");
}

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