首页
题目
TAGS
首页
/
题库
/
[单选题]下面过程运行之后,则变量J的值为( )。的答案
搜答案
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
单选题
2021-07-23 06:19
A、3
B、10
C、9
D、7
查看答案
正确答案
B
试题解析
解析:本题考查简单的程序语句。该过程首先是一个声明语句,声明语句用于命名和定义常量、变量、数组和过程等;赋值语句是为变量指定一个值或表达式;在J=J*2执行后,J的值就从5变成了10。答案为B。
标签:
感兴趣题目
定义两个过程Private Sub Fun 1(S as String)和Private Sub Fun2 (a( )as String*6),在调用过程中用Dim St (6) as String*6定义了一个字符串数组。下面调用语句中正确的有()。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(st(6))
语句“Dim i,j As Integer”的含义是“定义两个整型变量i和j”。
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J+2
运行下面程序代码后,变量J的值为______。Private Sub Full () Dim j as Integer J=10 DO J=J+3 Loop While J<19 End Sub
运行下面程序代码后,变量J的值为______。 Private Sub Fun() Dim J as Integer J=10 Do J=J+3 Loop While J<19 End Sub
阅读程序: Option Base 1 Dim arr( )As Integer Private Sub Form_Click( ) Dim i AsInteger,j As Integer ReDim arr(3,2) For i=1 To 3 Forj=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Nextj Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为
阅读程序: Option Base 1 Dim arr()As Integer Private Sub Form_Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next j Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输入结果为______。
有以下程序: Option Base 1 Dim arr()As Integer Private Sub Form. Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next j Print arr(3,2);arr(3,4) End Sub 程序运行后,单击窗体,输出结果为______。
若x,i,j和k都是int型变量,则执行下面表达式后x的值为()。x=(i=4,j=16,k=32)
当Form_Click;事件发生时,窗体上显示的第三行是 ______。 Private Sub Form_Click() Dim i As Integer, j As Integer, k As Integer Dim x(5, 5) As Integer For i = 1 To 5 k = 1 For j = 1 To 5 If i <= j Then x(i, j) = k + 1 k=k+2 Else x(i, j) = k + 1 End If Next j Next i For i = 1 To 5 For j = 1 To 5 Print x(i, j) Next j Print Next i End Sub
当发生Form_Click事件时,窗体上显示的第三行是( )。 Option Base 1 Private Sub Form_Click() Dim i As Integer,j As Integer,k As Integer Dim a(5,5)As Integer For i=1 To 5 k=1 For i=1 To 5 If(i<=j)Then a(i,j)=k k=k+2 Else a(i,j)=k+1 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j); Next j Print Next i End Sub
编写以下程序段: DIM I, J, K, A A=0 FOR I = 1 TO 3 FOR J = 1 TO I FOR K=-J TO 3 A=A+1 NEXT K NEXT J NEXT I 执行上面的三重循环后,变量A的值为( )。
相关题目
设j为Int型变量,则下面for循环语句的执行结果是( )。 for(j=10;j>3;j--) { if(j%3)j--; --j;--j; printf("%d",j); }
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
下面过程运行之后,变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J * 2
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
设i,j,k均为int型变量,执行完下面的for循环后,k的值为() for (i=0,j=10;i<=j;i++,j--)k=i+j;
若x、i、j和k都是int型变量,则计算下面表达式后,x的值为( ) x=(i=4,j=16,k=32)
有如下一个Sub过程: Sub mlt (ParamArray numbers()) n=1 For Each x In numbers n=n * x Next x Print n End Sub在一个事件过程中如下调用该Sub过程: Private Sub Coinmand1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 则运行该程序,结果为______。
下面程序执行时,输出的结果是( )。 Private Sub Form_Click() DimiASInteger,j As Integer i=10 Do i=i+j forj=10 toistep-3 i=i+j nextj Loop Whilei<50 Printi;j End Sub
编写如下事件过程和函数过程: Private Sub Command1_Click() Dim num(1 To 6)As Single num(1)=103:num(2)=190:num(3)=0 num(4)=32:num(5)=-56:num(6)=100 Print Print p2(6,num()) End Sub Private Function p2(By Val n As Integer, number() As Single) As Integer p2=number(1) For j=2 To n If number(j)<p2 Then p2=number(j) Next j End Function 程序运行后,在窗体上输出( )。
编写如下事件过程和函数过程: Private Sub Command1_Click() Dim num(1 To 6) As Single num(1)=103: num(2)=190: num(3)=0 hum(4)=32:num(5)=-56: num(6)=100 Print Print p2(6,num()) End Sub Private Function p2(ByVal n As Integer, number() As Single) As Integer p2=number(1) For j=2 To n If number(j)<p2 Then p2=number(j) Next j End Function 程序运行后,在窗体上输出( )。
当Form1_Click事件发生时,窗体上显示的第三行是( )。 Option Base 1 Private Sub Form_Click() Dim i As Integer,j As Integer Dim k As Integer,a(5,5)As Integer For i=1 To 5 k=1 For j=1 To 5 If i<=j Then a(i,j)=k k=k+1 Else a(i,j)=1 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j); Next j Print Next i End Sub
已知i,j,k为int型变量,若从键盘输入:1,2,3<回车>,使i的值为1,j的值为2,k的值为3,以下选项中正确的输入语句是
设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerEhd Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是
在窗体上画一个名称为Connand1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer, j As Integer Dim a(10, 10) As Integer For i = 1 To 3 For j = 1 To 3 a(i, j) = (i - 1) * 3 + j Print a(i, j); Next j Print Next i End Sub程序运行后,单击命令按钮,窗体上显示的是______。
在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,j As Integer Dim a(10, 10)As Integer For i=1 To 3 For i=1 To 3 a(i,j)=(i-1) *3+j Print a(i,j); Next i Print Next i End Sub 程序运行后,单击命令按钮,窗体上显示的是
程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End Sub
已知int i=1,j=2;则表达式i+++j的值为()
已知int i=1,j=2;则表达式++i+j的值为()
若有定义:int i=1,j=5;则表达式(++j)*(i--)的值为()
"程序中有两个过程Private Sub Fun1(S As String)和Private Sub Fun2(a()As String*6),在调用过程中用Dim St(6)As String*6定义了一个字符串数组。下面调用语句中正确的是() ①Call Fub1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(St(6))
广告位招租WX:84302438
题库考试答案搜索网
免费的网站请分享给朋友吧