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

看不懂!!1

Posted by lxwfan at 2006-07-23 19:16:11
#include<cstdio>
union ITEM
{
	int i;
	float f;
}a;
char s[100];
int main()
{
	puts("Program 6 by team X");
	while(scanf("%s",s)!=EOF)
	{
		int tmp=0;
		for(int i=1;s[i]!='\0';i++)tmp=tmp+tmp+s[i]-'0';
		if(tmp==0)printf(" 0.000000e+000\n");
		else
		{
			if(s[0]=='1')putchar('-');
			else putchar(' ');
			a.i=(((tmp>>8)+64)<<23)|((tmp&0xff)<<15);
			printf("%e\n",a.f);
		}
	}
	puts("End of program 6 by team X");
	return 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