有程序段如下:
STORE 0 T0 X,Y
D0 WHILE.T.
X=X+1
Y=Y+X
IF X>=100
EXIT
ENDIF
ENDDO
?“Y=”+STR(Y,3)
这个程序的功能是【 】。
第1题:
下列程序段执行以后,内存变量Y的值是( )。 CLEAR x=12345 y=O DO WHILE x>0 y=y+x%10 x=int(x/l0) ENDDo ?Y
A.54321
B.12345
C.51
D.15
第2题:
已知float x=2.23,y=4.35;,根据下面的输出结果,正确的程序段是()。 x=2.230000,y=4.350000 y+x=6.58,y-x=2.12
A.printf("x=%8.2f,y=%8.2f",x,y); printf("y+x=%4.2f,y-x=%4.2fn",y+x,y-x);
B.printf("x=%8.6f,y=%8.6fn",x,y); printf("y+x=%4.2f,y-x=%4.2fn",y+x,y-x);
C.printf("x=%7.2f,y=%7.2fn",x,y); printf("y+x=%3.2f,y=%3.2fn",y+x,y-x);
D.printf("x=%f,y=%fn",&x,&y); printf("y+x=%f,y=%fn",y+x,y-x);
第3题:
9、已知float x=2.23,y=4.35;,根据下面的输出结果,正确的程序段是()。 x=2.230000,y=4.350000 y+x=6.58,y-x=2.12
A.printf("x=%8.2f,y=%8.2f",x,y); printf("y+x=%4.2f,y-x=%4.2f\n",y+x,y-x);
B.printf("x=%8.6f,y=%8.6f\n",x,y); printf("y+x=%4.2f,y-x=%4.2f\n",y+x,y-x);
C.printf("x=%7.2f,y=%7.2f\n",x,y); printf("y+x=%3.2f,y=%3.2f\n",y+x,y-x);
D.printf("x=%f,y=%f\n",&x,&y); printf("y+x=%f,y=%f\n",y+x,y-x);
第4题:
(33)有如下事件程序,运行该程序后输出结果是
Private Sub Command33_Click()
Dim x As Integer,y As Integer
x=1:y=0
Do Until y<=25
y=y+x*x
x=x+1
Loop
MsgBox "x="&x&",y="&y
End Sub
A)x=1,y=0
B) x=4,y=25
C)x=5,y=30
D)输出其他结果
第5题:
已知float x=2.23,y=4.35;,根据下面的输出结果,正确的程序段是()。 x=2.230000,y=4.350000 y+x=6.58,y-x=2.12 (单选2 分)
A.printf("x=%8.6f,y=%8.6fn",x,y); printf("y+x=%4.2f,y-x=%4.2fn",y+x,y-x);
B.printf("x=%8.2f,y=%8.2f",x,y); printf("y+x=%4.2f,y-x=%4.2fn",y+x,y-x);
C.printf("x=%7.2f,y=%7.2fn",x,y); printf("y+x=%3.2f,y=%3.2fn",y+x,y-x);
D.printf("x=%f,y=%fn",&x,&y); printf("y+x=%f,y=%fn",y+x,y-x);