dim a(5)for i=1 to 5a(i)=inextt=a(1)for i =2 to 5 a(i-1)=inexta(i-1)=tfor i=1to5print a(i)next结果是2-3-4-5-1为什么最后一个是1呢?
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 03:26:20
xRN0}nkHuG`Ԥ@#'&@ӗ7~/ǰ?p0nܶ{=( H<
p M<O΄`m0b#"ySknC-"pۼ};u]_M6KUǭE2e6s`UaN1NE7S_8oޱ }1P^k
$_Z3*Ȉ
d
!dBwfP8`xBL~oĒ<Ԑz]UGc0gnem+Y7MN4OXo 4w
dim a(5)for i=1 to 5a(i)=inextt=a(1)for i =2 to 5 a(i-1)=inexta(i-1)=tfor i=1to5print a(i)next结果是2-3-4-5-1为什么最后一个是1呢?
dim a(5)
for i=1 to 5
a(i)=i
next
t=a(1)
for i =2 to 5
a(i-1)=i
next
a(i-1)=t
for i=1to5
print a(i)
next
结果是2-3-4-5-1为什么最后一个是1呢?
dim a(5)for i=1 to 5a(i)=inextt=a(1)for i =2 to 5 a(i-1)=inexta(i-1)=tfor i=1to5print a(i)next结果是2-3-4-5-1为什么最后一个是1呢?
Dim a(5)
For i = 1 To 5
a(i) = i
Next
'此时,a(1)=1,a(2)=2,a(3)=3,a(4)=4,a(5)=5
t = a(1)
'此时,t=1
For i = 2 To 5
a(i - 1) = i
Next
'此时,a(1)=2,a(2)=3,a(3)=4,a(4)=5,a(5)未变化还是5
'此时i=6
a(i - 1) = t
'此时,a(i-1)=a(5)=t=1
For i = 1 To 5
Print a(i)
Next
DIM AS INTEGER A(6),I,T,J,P T=0 FOR I=1 TO 6:A(I)=7-I:NEXT FOR I=1 TO 5 FOR J=1 TO 5 IF A(J)>A(
Dim a(1 To 10) As Integer Dim i As Integer a(1) = 1 For i = 2 To 10 a(i) = a
VB练习题7道,七道全讲完才行一、Private Sub Command1_Cilck()Dim a(4,4)For i = 1 To 4For j = 1 To 4Next jNext iFor j = 3 To 4For j = 3 To 4Print a(j,i);Next jEnd Sub9 1210 13二、Private Sub Form _Click()Dim a(10),p(3)As Integerk = 5For i
Dim a, i% a=array(1,2,3,4,5,6,7) For i =Lbound(a) to Ubound(a) a(i)=a(i) *a(i) next i print a(i)下标越界了,为什么啊
下列程序的执行结果为().dim a(10),b(5) for i=1 to 10 a(i)=i next i for j=1 to 5 b(j)=j*20 next j
Dim a a=Array(1,2,3,4,5,6,7) For i=Lbound (a) To Ubound (a) a(i)=a(i)*a(i) Print a(i
下列程序段的执行结果为 dim a(5) for i=1 to 5 a(i)=i*i next i print a(i-1) A) 5 B) 25 C) 0 D) 16
Dim a(4) s=0 For i=1 to 4 s=s+a(i) Next i
dim i as integer dim sum as integer sum=0 for i=0 to 5 sum=sum+i next sum=?
怎么理解vb中 dim m(10) for i=1 to 5 m(i)=i*i next i print m(i-1)
..Dim a() a=Array(1,3,5,7,9) s=0 For i=1 To 4 s=s*10+a(i) Next i Print s 为啥答案是3579
求结果dim a(6) for i=0 to 6 a(i)=i+1 next for i=0 to 6 count=count+a(i)+1 next response.Write count求结果dim a(6)for i=0 to 6a(i)=i+1nextfor i=0 to 6count=count+a(i)+1nextresponse.Write count
49 B 0 C 不确定 D 程序出错 选哪个呢?为什么?VB程序 Dim aa=Array(1,2,3,4,5,6,7) For i =Lbound (0) TO Ubound(a) a(i)=a(i)*a(i) Next i Print a(i)上面打错了。是For i =Lbound (a) TO Ubound(a)
Private Sub Command1_Click() Dim i,j As Integer For i = 3 To 1 Step -1 Print Spc(5); For j = 1 To 2Private Sub Command1_Click()Dim i,j As IntegerFor i = 3 To 1 Step -1Print Spc(5);For j = 1 To 2 * i - 1Print *;nextjPrintNext iEnd Sub请问它为什
VB程序如下:Dim a a = Array(1,2,3,4,5,6,7,8) i = 0 For k = 100 To 90 Step -2完全看不懂...要详解..VB程序如下:Dim aa = Array(1,2,3,4,5,6,7,8)i = 0 For k = 100 To 90 Step -2s = a(i)^2If a(i) > 3 Then Exit Fori = i + 1Next kPrint k; a(
dim a(5)for i=1 to 5a(i)=inextt=a(1)for i =2 to 5 a(i-1)=inexta(i-1)=tfor i=1to5print a(i)next结果是2-3-4-5-1为什么最后一个是1呢?
dim a(5)for i=1 to 5a(i)=inexta(1)=tfor i =2 to 5a(i-1)=a(i)nexta(i-1)=tfor i=1 to 5print a(i)next结果是2-3-4-5-1为什么最后一个是1呢.
dim I% ,S% s=0 for I=5 to 1 s=s+i next I print “s=” ; s 怎么看的 dim I% ,S%s=0for I=1 to 5 step -1s=s+inext Iprint “s=”;s 还有这个一起求解释~