What is the final value of "count" after the pseudocode fragment shown below? count = 0 For i = 1 to 3 For j = i + 1 to 4 count := count + (j - i) End-for End-for 单项选择题
A
0
B
10
C
20
D
35
登录即可查看完整答案
我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。
类似问题
What is the output? int columns; int rows; for (rows = 0; rows < 2; ++rows) { for (columns = 0; columns < 3; ++columns) { cout << "x"; } cout << endl; }
What is the output? char letter1; char letter2; letter1 = 'p'; while (letter1 <= 'q') { letter2 = 'x'; while (letter2 <= 'y') { cout << letter1 << letter2 << " "; ++letter2; } ++letter1; }
Which of the following statements is correct?
How many times is q calculated in the inner most loop when i=30 and k=-3? for i in range(40): j = 4 for k in range(5,-5,-1): s = 5 + j + k for x in range(5,-9,-3): q = -x*s
更多留学生实用工具
希望你的学习变得更简单
加入我们,立即解锁 海量真题 与 独家解析,让复习快人一步!