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 monster95 at 2015-09-15 17:53:25 on Problem 1005
#include<stdlib.h>
#define pi 3.1415926
int main()
{
	int n,i,*m;
	float *a,*b;
	scanf("%d",&n);
	m=(int*)malloc(sizeof(int)*n);
	a=(float*)malloc(sizeof(float)*n);
	b=(float*)malloc(sizeof(float)*n);
	for(i=0;i<n;i++)
	{
		scanf("%f %f",&a[i],&b[i]);
		m[i]=(int)(0.5*pi*(a[i]*a[i]+b[i]*b[i]))/50+1;	
	}
	for(i=0;i<n;i++)
	printf("Property %d: This property will begin eroding in year. %d\n",i+1,m[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