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> int main() { int a[7]={0,1,4,9,16,25,36}; int b[7]; int i; int total,count; for(i=1;i<=6;i++) scanf("%d",&b[i]); while(b[1]!=0||b[2]!=0||b[3]!=0||b[4]!=0||b[5]!=0||b[6]!=0) { total=0; for(i=1;i<=6;i++) total+=a[i]*b[i]; //printf("%d\n",total); if(total%36==0) count=total/36; else count=total/36+1; printf("%d\n",count); for(i=1;i<=6;i++) scanf("%d",&b[i]); } //getch(); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator