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

printf之实数输出,弱智级别的东西,可我就是很陌生-_-

Posted by majia001 at 2006-09-05 10:41:40 on Problem 2988
In Reply To:请用%100000000e输出 Posted by:majia001 at 2006-09-04 20:33:22
虽然举的例子很恶心...(vc6)
**************************************************************************

a=1.234567891011121314e1;

1.234568e+001                  %e
12.345679                      %f
12.3457                        %g

       1.234568e+001           %20e
           12.345679           %20f
             12.3457           %20g

1.23456789101112130000e+001    %.20e
12.34567891011121300000        %.20f
12.345678910111213             %.20g

1.23456789101112130000e+001    %20.20e
12.34567891011121300000        %20.20f
   ~~~~~~~~~~~~~~~~~~~~(20位)
  12.345678910111213           %20.20g
~~~~~~~~~~~~~~~~~~~~(20位)

**************************************************************************

a=1.234567891011121314e14

1.234568e+014                           %e
123456789101112.120000                  %f
1.23457e+014                            %g

       1.234568e+014                    %20e
123456789101112.120000                  %20f
        1.23457e+014                    %20g

1.23456789101112120000e+014             %.20e
123456789101112.12000000000000000000    %.20f
123456789101112.12                      %.20g

1.23456789101112120000e+014             %20.20e
123456789101112.12000000000000000000    %20.20f
                ~~~~~~~~~~~~~~~~~~~~(20位)
  123456789101112.12                    %20.20g
~~~~~~~~~~~~~~~~~~~~(20位)

**************************************************************************

poj上很少有输出double最高精度的情况啊...

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