vb下面程序,运行时内循环总次数是 For m=1 to 3 For N=0 to m-1 next N next mFor m=1 to 3 For N=0 to m-1 next N next m

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 20:30:55

vb下面程序,运行时内循环总次数是 For m=1 to 3 For N=0 to m-1 next N next mFor m=1 to 3 For N=0 to m-1 next N next m
vb下面程序,运行时内循环总次数是 For m=1 to 3 For N=0 to m-1 next N next m
For m=1 to 3
For N=0 to m-1
next N
next m

vb下面程序,运行时内循环总次数是 For m=1 to 3 For N=0 to m-1 next N next mFor m=1 to 3 For N=0 to m-1 next N next m
m=1时,n只从0到0运行了一次.
m=2时,n从0到1运行了两次.
m=3时,n从0到2运行了三次.
故内循环总次数是:1+2+3=6次.