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

Re:我的程序结果和他提示的一样,为什么总是runtime error

Posted by zbl at 2007-07-11 16:17:06 on Problem 1005
In 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:
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