[单选题]

(程序说明) 求1~10之间的所有整数之和。

(程序)

SET TALK OFF

STORE 0 TO N,S

D.O WHILE (1)

N=N+1

S=S+N

IF (2)(3)

E.NDIF

E.NDDO

? “ S=”+STR (S,2)

SET TALK ON

RETURN(1)

A.F.

B.T.

C.N<=10

D.N>=10

参考答案与解析:

相关试题

(程序说明) 程序功能是求1到100之间的所有素数。(程序)SET TALK O

[单选题](程序说明) 程序功能是求1到100之间的所有素数。(程序)SET TALK OFFC.LEARJ=2D.O WHILE J<=100I=2D.O WHILE (5)IF MOD(J,I)=0(6)E.NDIFI=I+1E.NDDOIF (7)?JE.NDIFJ=J+1(8)SET TALK ONRETURN(5)A.I>JB.I>=JC.I<JD.I<=J

  • 查看答案
  • (程序说明)程序功能是求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 OF

    [单选题](程序说明)程序功能是计算一个整数的各位数字之和。(程序)SET TALK OFFINPUT“x=”TO xs=0D.O WHILE x!=0s=s+ MOD(x,10)(1)(2)? SSET TALK ON(1)A.x=INT(x*10)B.x=INT(x/10)C.x=x-INT(x/10)D.x=x-INT(x*10)

  • 查看答案
  • (程序)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 OFFDIMENSION A(6)FOR K=1 TO

    [单选题](程序)SET TALK OFFD.IMENSION A(6)F.OR K=1 TO 6A.(K)=30—3*KE.NDFORK=5D.O WHILE K>=1A.(K)=A(K)—A(K+1)K=K—1E.NDDO? A(1),A(2),A(4),A(6)SET TALK ONRETURNA.(1)的输出结果为 ______。A.24B.15C.27D.9

  • 查看答案
  • (程序)*** 主程序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

  • 查看答案
  • (程序)SET TALK OFFCLEARSS=0FORX=1TO10STEP3

    [单选题](程序)SET TALK OFFC.LEARSS=0F.OR X=1 TO 10 STEP 3SS=SS+XE.NDFOR? SSSS的输出结果为 ______。A.22B.18C.12D.19

  • 查看答案
  • (程序说明) 程序功能是按姓名提供学生成绩的查询。(程序)SET TALK OF

    [单选题](程序说明) 程序功能是按姓名提供学生成绩的查询。(程序)SET TALK OFFUSE STDA.CCEPT“请输入待查学生姓名:”TO XMD.O WHILE (4)IF (5)?“姓名:”+姓名,“成绩:”+STR (成绩,3,0)E.NDIF(6)E.NDDOSET TALK ONRETURN(4)A.BOF ()B.EOF ()C.NOT. EOF()D.NOT. BOF()

  • 查看答案
  • (程序)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程

  • 查看答案
  • (程序)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

  • 查看答案
  • (程序说明) 求1~10之间的所有整数之和。(程序)SET TALK OFFST