Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
求告知那错了#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator