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 |
这道题的输入怎么解决啊?即没指定test数据的个数,又没说在什么条件下结束数据输入。#include <stdio.h> int main() { int N; while(1) { scanf("%d",&N); if(N<0||N>10000) break; printf("%5d",N); printf(" -> "); printf("%d\n",compute(N)); } } #include <stdio.h> int main() { int N; while(scanf("%d",&N)) { break; printf("%5d",N); printf(" -> "); printf("%d\n",compute(N)); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator