A question about data type transformation and output ~~~~ Urgent ~~~ !!! Thank you.

zhaozj2021-02-16  60

Main () {INT i = 128; float x = 234.89; double y = -123.4567; char CH = '*'; Printf ("% d / t% f / t% lf / n", ix, y); / * Results 128 234.889999 ---- Question 1 -123.456700 * / printf ("%. 3F% .3e / n", x, x); / * result is 234.8902.349e 002 * / printf ("% 08.3f /t.3e/n" ,x, ×);/* 0234.890 2.349e 002 ---- Question 2 (not add 0?) * / printf ("% g% f% E / N", Y, Y, Y); / * - 123.457-123.156700-1.234567E 002 ---- ???? Do not understand * / printf ("% 6c% C% C% D% D %%", CH, CH , ch, i); / * ^^^^^ (Space is so 5, should it be 3?) *** 128-18348120029% ----- Do not understand * /

} This is the title of the book to help me explain. Thank you for your test.

转载请注明原文地址:https://www.9cbs.com/read-18930.html

New Post(0)