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 <stdio.h> void main (){ int n,i,j; long a[5]; scanf ("%d",&n); for (j=0;j<=3;j++) scanf ("%ld",&a[j]); while (i<=n){ if ((a[2]%a[1]==0)&&(a[2]*a[2]==a[1]*a[3])) a[4]=a[3]*a[1]/a[0]; if (a[2]-a[1]==a[1]-a[0]) a[4]=a[3]+a[2]-a[1]; if (!(((a[2]%a[1]==0)&&(a[2]*a[2]==a[1]*a[3]))||(a[2]-a[1]==a[1]-a[0]))) break; printf ("%ld %ld %ld %ld %ld\n",a[0],a[1],a[2],a[3],a[4]); i++; for (j=0;j<=3;j++) scanf ("%ld",&a[j]); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator