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 15:59:39 on Problem 1969
#include <stdio.h>
void main (){
	int i,a,b,c,d;
	scanf ("%d",&a);
	while (a>=1){
		b=a;
		for (i=1;;i++){
			b=b-i;
			if (b<=0){
				b=b+i;
			break;
			}
		}
		if (i%2==1){
			c=i-b+1;
			d=b;
		}
		else{
			c=b;
			d=i-b+1;
		}
		printf ("TERM %d IS %d/%d\n",a,c,d);
	    scanf ("%d",&a);
	}
}


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