下述程序执行后,输出结果是( )。 For n=3 To 1 Stew -1 x$=String$(n,"#") Print x$ Next nA.1# 2# 3#B.### ## #C.# ## ###D.3# 2# 1#

下述程序执行后,输出结果是( )。 For n=3 To 1 Stew -1 x$=String$(n,"#") Print x$ Next n

A.1# 2# 3#

B.### ## #

C.# ## ###

D.3# 2# 1#


相关考题:

下列程序执行后,输入结果是()。 For n = 3 To 1 Step - 1 x$ = String$(n,"#") Print x$ Next inA. 1# 2# 3# B. ### ## #C. # ## ### D. 3# 2# 1#

有如下程序,运行时输出的结果是 ______。 Option Base 1 Private Sub Command1_Click() Dim a(3,3) As Integer For m=1 To 3 For n=1 To 3 a(m-1,n-1)=m+n+1 Next n Next m For m=0 To 2 For n=0 To 2 Print a(n,m); Next n Print Next m End SubA.0 1 2 1 2 3 2 3 4B.3 4 5 4 5 6 5 6 7C.1 3 5 3 5 7 5 7 9D.2 4 6 4 6 8 6 8 10

下列程序段的执行结果为( )。 Dim A(3,3) For M=1 To 3 For N=1 To 3 If N=M Or N=3-M+1 Then A(M,N)=1 Else A(M,N)=0 End If Next N Next M For M=1 To 3 For N=1 To 3 Print A(M,N) Next N Print Next MA.1 0 0 0 1 0 0 0 1B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1

假定有如下事件过程: Privte Sub Form_Click0 Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是( )。A.81 4B.56 3C.28 1D.243 5

下列程序运行后的输出结果是 Function Fun(n) x=n*n Fun=x一11 End Function Private Sub Command1_Click() For k=1 To 2 Y=Fun(k):Print Y Next End SubA. -10 -7B.10 8C.1 3D.0 4

(16)在窗体上画一个命令按钮,其名称为Commandl.程序运行后,单击命令按钮,输出结果是 Private Sub p1(n As Integer) For i=n To 1 Step -1 x=String(i,"*") Print x Next i End Sub Private Sub Commandl_Click() P1(3) End SubA.*** ** *B.* ** ***C.* * *D.******

有以下程序 main ( ) { int i,n=0; for (i=2 ;i<5;i++) { do { if (i%3) continue; n++; } while(!i); n++; } print f ( "n=%d\n" , n); } 程序执行后的输出结果是A.n=5B.n=2C.n=3D.n=4

以下程序的执行结果是______ include include void print(int n) { if(n 以下程序的执行结果是______include<iostream.h>include<iomanip.h>void print(int n){if(n!=0){print(n-1);for(int i=1;i<=n;i++=cout<<setw(3)<<i;cout<<endl;}}void main(){print (4);}

有如下程序: Private Sub Commandl_Click( ) Dim i As Integer For i=1 To 2 DS Next i End Sub Sub DS( ) Dim x As Integer,m As String Static y,n X=X + 1 y=y + 1 m=m "*”:n=n"#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * #B.1 1 * #C.1 1 * # 1 1 * # 1 2 * #D.1 1 * # 1 1 * ## 1 2 * ##

下列程序的输出结果是class Test{public static void main(String args[]){int n=7;n 下列程序的输出结果是 class Test{ public static void main(String args[]){ int n=7; n<<=3; n=nn+1|n+2^n+3; n>>=2; System.out.println(n); } }A.0B.-1C.14D.64

下列程序段的执行结果为 ______。 n=16 For k=n To 1 Step-1 x=Sqr(k) x=x-2 Next k Print x-2A.-3B.-1C.1D.2

下列程序执行后,输出结果是( )。For n=3 To 1 Step-1x$=String$(n,"#")Print x$Next nA.1# 2# 3#B.)### ## #C.# ## ##D.3# 2# 1#

下列程序段的执行结果为 Dim A(3,3) For M=1 To 3 For N=1 To 3 If N=M Or N=3-M+1 Then A(M,N)=1 Else A(M,N)=0 End If Next N Next M For M=1 To 3 For N=1 To 3 Print A(M,N) Next N Print Next MA.1 0 0 0 1 0 0 0 0B.1 1 1 1 1 1 1 1 1C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1

有如下事件过程: Private Sub Commaild1_Click( ) Dim i As Integer For i =1 To 2 DC Next i End Sub Sub DC( ) Dim x As Integer,m As String Static y,n x=x + 1 y=y + 1 m=m"*":n=n "#" Print x,y,m,n End Sub 程序运行后,输出的结果是A.1 1 * # 1 1 * #B.1 1 * # 1 2 * #C.1 1 * # 1 1 * ##D.1 1 * # 1 2 * ##

下列程序段执行后,执行的结果是______ 。 Dim M(10) Dim N(10) i=3 For j = 1 To 5 M(j) = j N(i) = 2 * i + j Next j Print N(i); M(i)A.12 4B.11 3C.3 11D.10 2

下述程序的运行结果是 For m=3 Tol Step-1 x$=String$(m,"#") Print x$ NextA.1# 2# 3#B.### ## #C.# ## ###D.3# 2# 1#

单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub

以下程序段的执行结果是 ______。 Dim A(3, 3) For m = 1 To 3 For n = 1 To 3 If n = m Or n = 3 - m + 1 Then A(m, n) =m + n Else A(m, n) = 0 End If Next n Next m For m = 1 To 3 For n = 1 To 3 Print A(m, n); Next n Print Next mA. 1 1 1 1 1 1 1 1 1B.2 0 4 0 4 0 4 0 6C.0 0 0 0 0 0 0 0 0D.1 0 1 0 1 0 1 0 1

下列程序段的执行结果为______ 。 Dim A(4) N= 3 A(1) =1 For K=0 To N-1 For L=1 To K+1 X=K+2 -L A(X)=A(X)+A(X-1) If K<N-1 Then Exit For Print A(X); Next L Next KA. 1 2 1B.1 2 3C.2 4 6D.1 3 1

在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果为( )。 Private Sub p1(n As Integer) For i=n To 1 Step-1 x=String(i,"*") Print x Next i End Sub Private Sub Command1_Click() p1(3) End SubA.*** ** *B.* ** ***C.* * *D.******

在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果是( )。 Private S.b p1(n As Integer) For i=n To 1 Step=1 x=String(i,"*") Print x Next i End Sub Private Sub Command1 Click( ) pl(3) EndSubA.*** ** *B.*** ***C.* * *D.******

以下程序运行后输出的结果是______。 For j=i To 4 GoSub s: m=m+1/n Next j Print m;n End s:n=j*(j+1) ReturnA.0.8,20B.0.75,12C.1.8,20D.1.75,12

有下列程序: fun(int x) {int p; if(x= =0 ‖ x= =1) return(3); p=x-fun(x-2); return p; } main( ) { print f("%d\n",fun(7 ));} 执行后输出的结果是( )。A.7B.3C.2D.0

有以下程序#ncludestdio.hmain(){ struct node{int n;struct nodc*next;}*p;struct node x[3]={{2,x+1},{4,x+2},{6,NULL}};p=x:printf("%d,",p-n);printf("%d\n",P-next-n);}程序运行后的输出结果是A.2,3B.2,4C.3,4D.4,6

下列程序运行后的输出结果是 Private Sub Command1_Click() For k=3 To 1 Step-1 x=String(k,"*") Print x Next End SubA.* * * * * *B.1 * 2 * 3 *C.3 * 2 * * 1 * * *D.* * * * * *

下述程序执行后,输出结果是( )。 For n = 3 To 1 Step-1 x$ = String$(n, "#") Print x$ Next nA.1# 2# 3#B.### ##C.# ## ###D.3# 2# 1#

下列程序段的执行结果为 ______。 N=10 For K=N To 1 Step -1 X=Sqr(K) X=X-2 Next K Print X-2A.-3B.-1C.1D.1.16227765