For j = 10 To i + 1 Step -1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/22 22:00:36
Forj=10Toi+1Step-1Forj=10Toi+1Step-1Forj=10Toi+1Step-1执行循环,在j=10到i+1的条件下进行循环,每循环一次j减1如:i=1,则i+1=2则,j
For j = 10 To i + 1 Step -1
For j = 10 To i + 1 Step -1
For j = 10 To i + 1 Step -1
执行循环,在j=10到i+1的条件下进行循环,每循环一次j减1
如:i=1,则i+1=2
则,j从10开始,到2结束,执行for语句段的代码
For j = 10 To i + 1 Step -1
j=0 for i=1 to 10 j=j+i Next print j 请画出此程序的流程图并写出j的值
For i = 1 To 10 f = True For j = 1 To 9 If a(j) > a(j + 1) Then t = a(j) a(j) = a(j + 1) a(j + 1) =For i = 1 To 10f = TrueFor j = 1 To 9If a(j) > a(j + 1) Thent = a(j)a(j) = a(j + 1)a(j + 1) = tf = FalseEnd IfNext jIf f ThenExit ForEnd IfNext i其中
for i=1 to 10 i=i+i j=j+1 next print i,j请问结果是什么?结果是15
J = 10 For I = 1 To J Step 5 I = I + 2 J = J - I Next I Print I Print J结果咋是15 和-3呢,要详细的哈,3Q3Q
Var a:array[1..10]of integer; j,i:integer; begin a[i]:=a[i]+i; for j:=1 to i do a[j]:=a[i]+j; .Var a:array[1..10]of integer; j,i:integer; begin a[i]:=a[i]+i;for j:=1 to i do a[j]:=a[i]+j;end;for i:=1 to 10 do write(a[i],' ');eod.
下列程序的执行结果为().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
for(j=i+1;j
下面程序段运行后 for i=1 to 5 for j=2 to i print*;next j next i 为什么结果是10个“*”
for(i=1;i<10;i++){for(j=1;j<=i;j++)解释一下这是什么意思?
2个矩阵相加,For i = 1 To 4For j = 1 To 4c(i,j) = a(i,j) + b(i,j)Picture3.Print c(i,j);If i = 1 And j = 1 ThenMax = c(i,j)ElseIf Max < c(i,j) Then Max = c(i,j):n = i:m = jEnd IfNext jPicture3.PrintNext i这个和For i = 1 To 4For j = 1 To 4c(i,j)
FOR循环次数的计算j=0for i=1 to 10j=j+1Nextprinit j请你算出 j=? 并画出流程图能不能把计算过程也说明一下 谢谢
下标越界dim .for i = 1 to 7for j = 1 to 7 if i = 1 or j = 1 then a(i,j)=1elsea(i,j) =a(i-1,j-1)+a(i-1,j)end ifnext j next ifor i= 1 to7for j= 1 to iprint a(i,j)next j printnext i .运行说是下标越界 a(i,j) =a(i-1,j-1
Dim x(3,5) As Integer For i = 1 To 3 For j = 1 To 5 x(i,j) = x(i - 1,j - 1) + i + j Next j Next iprint (3,4)
Dim j%,i%,m% m = 0 For i = 1 To 3 For j = 1 To i m = m + j Next j,i Text1 = Str(m)最后m j 是多少
SET TALK OFF CLEAR FOR I=1 TO 20 FOR J=1 TO 33 FOR K=(100-I*5-J*3)*3 IF I=J=K=100 I,J,K ENDIF ENDFOK=(100-I*5-J*3)*3 提示语法错误SET TALK OFFCLEARFOR I=1 TO 20FOR J=1 TO 33FOR K=(100-I*5-J*3)*3IF I=J=K=100I,J,KENDIFENDFORENDFORENDFORSET TALK ON
for (i=1,j=10;i
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