【程序】SET TALK OFFN=325X=“ABCDEFGHIJ”Y=“甲乙丙丁戊已.”NC=ALLTRIM(STR(N,6))L=LEN(NC)N2=2*L-1NN="K=1DO WHILE K<=LN1=INT(VAL(SUBSTR(NC,K,1))* 2+1)NN=NN+SUBSTR(X,N1,1)NN=NN+SUBSTR(Y,N2,2)? N1,N2,NNN2=N2-2K=K+1ENDDO? KSET TALK ON第一次输出结果为 ______。A.7 4G 甲B.7 5G乙C.7 5G 丙D.7 4G乙
【程序】
SET TALK OFF
N=325
X=“ABCDEFGHIJ”
Y=“甲乙丙丁戊已.”
NC=ALLTRIM(STR(N,6))
L=LEN(NC)
N2=2*L-1
NN="
K=1
DO WHILE K<=L
N1=INT(VAL(SUBSTR(NC,K,1))* 2+1)
NN=NN+SUBSTR(X,N1,1)
NN=NN+SUBSTR(Y,N2,2)
? N1,N2,NN
N2=N2-2
K=K+1
ENDDO
? K
SET TALK ON
第一次输出结果为 ______。
A.7 4G 甲
B.7 5G乙
C.7 5G 丙
D.7 4G乙
相关考题:
【程序】SET TALK OFFCLEARINPUT“N=”TO NINPUT“M=”TO MX=MIN(N,M)FOR I=X TO 1 STEP -1IF M/I=INT(M/I)AND N/I=INT(N/I)Y1=IEXITENDIFENDFOR?“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
有以下程序: #include main( ) { int k,n=0;char c,str[]="teach"; for(k=0;str[k];k++) { c=str[k]; switch(k) { case 1:case 3:case 5:putchar(c);printf("%d",++n);break; default:putchar(′N′); } } } 序的运行结果是( )。A.Ne1NNB.e1a2e3C.Ne1Nc2ND.Na1NNNN
44、以下程序的输出结果是。 set1 = {1, 2, 3} set2 = {4, 5, 6} print(len(set1 + set2))A.3B.6C.0D.程序出错