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> 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator