Home > database >  The source code is wrong
The source code is wrong

Time:11-18

# include
Voidmain ()
{inta, b;
Floatd, e;
Charc1, c2;
Doublef, g;
Longn, m;
Unsignedp, q;
a=61; B=62;
C1='a'; C2='b';
D=3.56; E=6.87;
F=3156. 890121; G=0.123456789;
M=50000; N=60000;
P=32768; Q=40000;
Printf (" a=% d, b=% d \ % nc1=c, c2=% \ nd c=% 6.2 f, e=% 6.2 f \ n ", a, b, c1, c2, d, e);
Printf (" % f=15.6, f, g=% 15.12 f \ nm=% ld, n=% ld \ np=% u, q=% u \ n ", f, g, m, n, p, q);
}
(1) to run this program and analysis results,
(2) based on this, modify the program of line 9-14:
a=61; B=62;
C1=a; C2=b;
F=3156890 121; G=0.123456789;
D=f; E=g;
P=a=m=50000; Q=b=n=- 60000;
To run the program, the analysis results,
(3) to the following 9-14 lines to the scanf statement, which USES the scanf function receives input from the keyboard
Data:
The scanf (" % % % d, % d, c, c, % f, % f, % lf, lf, % % ld, % ld, % u, % u ", & amp; A, & amp; B, & amp; C1, & amp; C2,
& D, & amp; E, & amp; F, & amp; G, & amp; M, & amp; N, & amp; P, & amp; Q);
To run the program (without error) input data are as follows:
61 on conversion, a, b, 3.56, 6.87, 3156890, 121,0.123456789, 50000-60000327, 68400, 00

This source code is wrong, which members can help to?
  • Related