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

输出有什么要求吗?

Posted by guojunpeng at 2005-04-12 14:13:44 on Problem 1001
> 我用整型数组来存贮结果的各位数值,然后按
> 照题目的要求的格式来输出结果。代码如下:
> for (iPos=resultBit-1;iPos>=exponent*decBit;iPos--)  //输出整数的各个数值
>      cout<<result[iPos];
>  if (decBit!=0)    // 如果有小数位,输出小数点和小数数值
>     {
>	cout<<'.';
>	for (iPos=exponent*decBit-1;iPos>=0;iPos--)
>	    cout<<result[iPos];
>    }
> 这样输出行不行,假若我的计算结果是正确的。

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