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 |
为什么WA?哪位大牛帮忙看下哪里出问题?#include <stdio.h> #include <stdlib.h> int main() { int aim,anwser; while(1){ scanf("%d",&aim); if(aim==0) break; while(1){ anwser=0; while(aim!=0){ anwser+=aim%10; aim/=10; } if(anwser<10) break; else aim=anwser; } printf("%d\n",anwser); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator