A.RECORD B.CASE C.WHILE D.WITH
分析下面的PASCAL程序,給出正確的運(yùn)行結(jié)果() PROGRAM mx(input,output); VAR R,s,t:integer; PROCEDURE change(a,b:integer); VAR T:integer; BEGIN A:=3*a; B:=2*b; T:=a+b; End; BEGIN R:=2;s:=4;t:=6; Change(r,s); Writeln(‘r=’,r,’s=’,s,’t=’,t)End.
A.r=2 s=4 t=6 B.r=2 s=4 t=14 C.r=6 s=8 t=6 D.r=6 s=8 t=14
如果輸入的數(shù)據(jù)是2,3,4,則下面程序的輸出應(yīng)為() PROGRAM SAM(INPUT,OUTPUT); VAR i,x,y:integer; BEGIN FOR i:=1 TO 3 DO BEGIN Read(x); y:=sqr(x)END; Writeln(‘x=’,x,‘y=’,y)END.
A.x=2 y=4 x=3 y=9 x=4 y=16 B.x=4 y=16 x=4 y=16 x=4 y=16 C.x=4 y=16 D.x=2 y=4 x=2 y=4 x=2 y=4