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

出错了吗?——我怎么觉不出来呢?刚才复制错了,抱歉!

Posted by laihang at 2004-12-24 17:30:41 on Problem 1658
#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:
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