vb题,For i=1 to 2 for j=1 to 2 for k=1 to jvb题,For i=1 to 2for j=1 to 2for k=1 to ja=a+2next knext jnext i最后变量a的值为10,怎么算,

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/20 15:41:36
vb题,For i=1 to 2 for j=1 to 2 for k=1 to jvb题,For i=1 to 2for j=1 to 2for k=1 to ja=a+2next knext jnext i最后变量a的值为10,怎么算,
x͔n@_e\Ż5Ĺx ^kCr@zH #0U'^ͺnXF3l2,Fɻ|d@ b夦5N{jfҐnxPLT[9?v'tQ==<|s?dQYfYjMU|.s)\e =:\OuO5>&)R"pxeJs 0w,ۏ`MBD8c!g"# BN,dZ @psnsHS&:uYeAǣL|6

vb题,For i=1 to 2 for j=1 to 2 for k=1 to jvb题,For i=1 to 2for j=1 to 2for k=1 to ja=a+2next knext jnext i最后变量a的值为10,怎么算,
vb题,For i=1 to 2 for j=1 to 2 for k=1 to j
vb题,
For i=1 to 2
for j=1 to 2
for k=1 to j
a=a+2
next k
next j
next i
最后变量a的值为10,怎么算,

vb题,For i=1 to 2 for j=1 to 2 for k=1 to jvb题,For i=1 to 2for j=1 to 2for k=1 to ja=a+2next knext jnext i最后变量a的值为10,怎么算,
①i=1   当j=1时
                       k=1   a=0+2=2
        当j=2 时,
                 k=1   a=2+2=4
                  k=2 a=4+2=6
②i=2  当j=1时,
                 k=1   a=6+2=8
        当j=2时
              k=1 → a=8+2=10
             k=2 → a=10+2=12
得 a=12为结果