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 90405129 at 2004-12-22 13:44:29 on Problem 1969
#include<stdio.h>
int n,i,j,s,t,b=1;
void main(){
	scanf("%d",&n);
	for(i=2;b!=0;i++){
		for(j=1;b!=0,j<i;j++){
			for(t=1;t<i;t++){
				if(t+j==i) s++;
				if(s==n)
				{printf("TERM %d IS %d/%d\n",n,j,t);b=0;break;}
}
  

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