| ||||||||||
| 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<stdio.h>
#include<math.h>
void main () {
int i,j=0,m,n,a[20];
for(;;)
{
for(i=0;;i++)
{
scanf("%d",&a[i]);
if(a[i]==0) goto l;
else if(a[i]==-1) goto end;
}l:
for(m=0;m<i;m++)
for(n=0;n<i;n++)
if(2*a[m]==a[n]) j=j+1;
else continue;
}
printf("%d",j);
end:;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator