[单选题]

(程序)

SET TALK OFF

D.IMENSION A(6)

F.OR K=1 TO 6

A.(K)=30—3*K

E.NDFOR

K=5

D.O WHILE K>=1

A.(K)=A(K)—A(K+1)

K=K—1

E.NDDO

? A(1),A(2),A(4),A(6)

SET TALK ON

RETURN

A.(1)的输出结果为 ______。

A.24

B.15

C.27

D.9

参考答案与解析:

相关试题

有如下程序:SET TALK OFFDIMENSION K(2,3)I=1D0

[单选题]有如下程序: SET TALK OFF DIMENSION K(2,3) I=1 D0 WHILE I<=2 J=1 DO WHILE J<=3 K(1,J)-I*J ??K(I,J) ??” ” J=J/1 ENDDO ? I=I+1 ENDDO RETURN 运行此程序的结果是( )。A.1 2 3 4 5 6B.1 2 3 2C.1 2 3 1 2 3D.1 2 3 1 4 9

  • 查看答案
  • (程序)SET TALK OFFI=1CLEARDO WHILE IINT(A)

    [单选题](程序)SET TALK OFFI=1CLEARDO WHILE IINT(A) .OR. A>=10 LOOP ELSE I(程序)SET TALK OFFI=1C.LEARD.O WHILE I<=2INPUT “A=” TO AIF A>INT(A) .OR. A>=10LOOPE.LSEINPUT “B=” TO BIF B=INT(B) .AND. B<10LOOPE.LSE?A,“+”,B“=”,A+BE.NDIFE.NDIFI=I+1E.NODOSET TALK ONRETURN程

  • 查看答案
  • (程序说明)程序功能是求30!。(程序)SET TALK OFFCLEARN=1

    [单选题](程序说明)程序功能是求30!。(程序)SET TALK OFFC.LEARN=1I=1D.O WHILE (1)(2)N=N+1(3)? ISET TALK ON(1)A.N<>30B.N>30C.N<30D.N<=30

  • 查看答案
  • (程序)*** 主程序SET TALK OFFCLEARSTORE 100 TO

    [单选题](程序)*** 主程序SET TALK OFFC.LEARSTORE 100 TO X,Y,ZSET PROCEDURE TO GC1D.O PROCl WITH X,Y? X,Y,ZSET PR()CEDURE TOSET TALK ONRETURN*** 过程PROCEDURE PROC1PARAMETER M,NM=M+100N=N+100RETURNX的输出结果为 ______。A.100B.200C.300D.400

  • 查看答案
  • 执行下列程序: CLEAR SET TALK OFF STORE 1 TO i,

    [单选题]执行下列程序: CLEAR SET TALK OFF STORE 1 TO i,a,b DO WHILE i<=3 DO PROG1 ??"P("+STR(i,1)+")="+STR(a,2)+"," i=i+1 ENDDO ??"b="+STR(b,2) RETURN PROCEDURE PROGl a=a*2 b=b+a SET TALK ON RETURN 程序的运行结果为A.P(1)=2,P(2)=3,P(3)=4,b=15B.P(1)=2,P(2)=4,P(3)=6,b

  • 查看答案
  • (程序)SET TALK OFFCLEARINPUT“N=”TO NINPUT“

    [单选题](程序)SET TALK OFFC.LEARINPUT“N=”TO NINPUT“M=”TO MX=MIN(N,M)F.OR I=X TO 1 STEP -1IF M/I=INT(M/I)AND N/I=INT(N/I)Y1=IE.XITE.NDIFE.NDFOR?“Y1=”+ALLTRIM(STR(Y1,19))+“,Y2=”+ALLTRIM(STR(M,N)/Y1,19))SET TALK ON若输入N、M的值分别为6,8,则Y1的输出结果为 ______。A.0B.1C.2D.3

  • 查看答案
  • (程序)SET TALK OFFCLEARSTORE 10 TO ASTORE

    [单选题](程序)SET TALK OFFC.LEARSTORE 10 TO ASTORE 20 TO BSET UDFPARMS TO REFERENCED.O SWAP W1TU A,(B)? A,BPROCEDURE SWAPPARAMETERS X1,X2TEMP=X1X1=X2X2=TEMPE.NDPROCSET TALK ONRETURNA.的输出结果为 ______。A.10B.20C.30D.5

  • 查看答案
  • 若有如下程序: SET TALK OFF INPUT TO X FOR i=1

    [单选题]若有如下程序: SET TALK OFF INPUT TO X FOR i=1 TO 3 INPUT TO Y IF Y>X X=Y ENDIF ENDFOR ?X RETURN 本程序的功能是( )。A.求3个数中的最大值B.求4个数中的最大值C.求3个数中的最小值D.求4个数中的最小值

  • 查看答案
  • 程序如下:SET TALK OFFINPUT TO XFOR i=1 TO 3I

    [单选题]程序如下:SET TALK OFFINPUT TO XF.OR i=1 TO 3INPUT TO YIF Y>XX=YE.NDIFE.NDFOR?XRETURN本程序的功能是( )。A.求3个数中的最大值B.求4个数中的最大值C.求3个数中的最小值D.求4个数中的最小值

  • 查看答案
  • (程序)SET TALK OFFCLEARSTORE .T. TO XSTORE

    [单选题](程序)SET TALK OFFC.LEARSTORE .T. TO XSTORE 0 TO YD.O WHILE XY=Y+1IF INT(Y/5)= Y/5?? YE.LSELOOPE.NDIFIF Y>15STORE .F. TO XE.NDIFE.NDDOSET TALK ONRETURN第一次输出Y值为 ______。A.5B.6C.7D.8

  • 查看答案
  • (程序)SET TALK OFFDIMENSION A(6)FOR K=1 TO