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 |
帮忙看看啊,怎么runtime error?#include <stdio.h> #include <math.h> void main() { int n,i,j,h,s,b; char a[4][33]; scanf("%d\n",&n); for(i=0;i<n;i++) for(j=0;j<33;j++) a[i][j]=getchar(); for(i=0;i<n;i++){ s=0; for(j=0;j<32;j++){ h=31-j; b=h%8; s+=(a[i][j]-48)*(int)pow(2,b); if(b==0){ if(j==31){ printf("%d\n",s); s=0; } else{ printf("%d.",s); s=0; } } } } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator