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 guqin at 2005-03-26 00:35:16 on Problem 1552
In Reply To:请教:为何会Runtime Error? Posted by:cainiao at 2004-07-14 16:30:33
> 源代码如下:
> #include "stdio.h"
> void main()
> {int a[15],i,j,n,m ;
> scanf("%d",&a[0]);
> while(a[0]!=-1)
> { i= 1;n=0;
> while(a[i-1]!=0)
> {scanf("%d",&a[i]);i++;n++;}
> m=0;for(i=0;i<n-1;i++)
> for(j=i+1;j<n;j++)
> if(a[i]==2*a[j]||a[j]==2*a[i]) m++;
> printf("%d\n",m);  
>  scanf("%d",&a[0]);
> }}

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