| ||||||||||
| 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 | |||||||||
求助!!!#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;
}
那位哥哥姐姐帮小弟一下1,2两不懂
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator