vb中关于for next循环的计算
1个回答
展开全部
j = 1
a = a + j \ 3 + j Mod 3 = 0 + 1 \ 3 + 1 Mod 3 = 0 + 0 + 1 = 1
j = 2
a = a + j \ 3 + j Mod 3 = 1 + 2 \ 3 + 2 Mod 3 = 1 + 0 + 2 = 3
j = 3
a = a + j \ 3 + j Mod 3 = 3 + 3 \ 3 + 3 Mod 3 = 3 + 1 + 0 = 4
j = 4
a = a + j \ 3 + j Mod 3 = 4 + 4 \ 3 + 4 Mod 3 = 4 + 1 + 1 = 6
j = 5
a = a + j \ 3 + j Mod 3 = 6 + 5 \ 3 + 5 Mod 3 = 6 + 1 + 2 = 9
j = 6
a = a + j \ 3 + j Mod 3 = 9 + 6 \ 3 + 6 Mod 3 = 9 + 2 + 0 = 11
j = 7
a = a + j \ 3 + j Mod 3 = 11 + 7 \ 3 + 7 Mod 3 = 11 + 2 + 1 = 14
j = 8
a = a + j \ 3 + j Mod 3 = 14 + 8 \ 3 + 8 Mod 3 = 14 + 2 + 2 = 18
j = 9
a = a + j \ 3 + j Mod 3 = 18 + 9 \ 3 + 9 Mod 3 = 18 + 3 + 0 = 21
j = 10
a = a + j \ 3 + j Mod 3 = 21 + 10 \ 3 + 10 Mod 3 = 21 + 3 + 1 = 25
最终结果为 25
a = a + j \ 3 + j Mod 3 = 0 + 1 \ 3 + 1 Mod 3 = 0 + 0 + 1 = 1
j = 2
a = a + j \ 3 + j Mod 3 = 1 + 2 \ 3 + 2 Mod 3 = 1 + 0 + 2 = 3
j = 3
a = a + j \ 3 + j Mod 3 = 3 + 3 \ 3 + 3 Mod 3 = 3 + 1 + 0 = 4
j = 4
a = a + j \ 3 + j Mod 3 = 4 + 4 \ 3 + 4 Mod 3 = 4 + 1 + 1 = 6
j = 5
a = a + j \ 3 + j Mod 3 = 6 + 5 \ 3 + 5 Mod 3 = 6 + 1 + 2 = 9
j = 6
a = a + j \ 3 + j Mod 3 = 9 + 6 \ 3 + 6 Mod 3 = 9 + 2 + 0 = 11
j = 7
a = a + j \ 3 + j Mod 3 = 11 + 7 \ 3 + 7 Mod 3 = 11 + 2 + 1 = 14
j = 8
a = a + j \ 3 + j Mod 3 = 14 + 8 \ 3 + 8 Mod 3 = 14 + 2 + 2 = 18
j = 9
a = a + j \ 3 + j Mod 3 = 18 + 9 \ 3 + 9 Mod 3 = 18 + 3 + 0 = 21
j = 10
a = a + j \ 3 + j Mod 3 = 21 + 10 \ 3 + 10 Mod 3 = 21 + 3 + 1 = 25
最终结果为 25
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询