| ||||||||||
| 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 | |||||||||
Re:我的程序结果和他提示的一样,为什么总是runtime errorIn Reply To:我的程序结果和他提示的一样,为什么总是runtime error Posted by:miaowei at 2007-02-10 15:35:17 > #include"stdio.h"
> #define PI 3.1415926
> void main()
> { int n,*year,i=1;float x,y;
> scanf("%d",&n);
> while(i<=n)
> { scanf("%f%f",&x,&y);
> year[i]=(int *)malloc(sizeof(int));
> year[i]=PI*(x*x+y*y)/100+1;
> i++;
> }
> for(i=1;i<=n;i++)
> printf("Property %d: This property will begin eroding in year %d.\n",i,year[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