Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

帮忙看看啊,怎么runtime error?

Posted by 90401319 at 2004-12-28 21:16:46 on Problem 2105
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator