The following statement loops ( ) times. for k=2:-2:13 k end
A: 0
B: 6
C: 13
D: 1
A: 0
B: 6
C: 13
D: 1
举一反三
- If k is integer, how many times will the following "while" loop be executed?k = 50 while k >; 1: print(k) k = k // 2 A: 3 B: 4 C: 5 D: 6
- If k is integer, how many times will the following "while" loop be executed?k = 50 while k > 1: print(k) k = k // 2 A: 3 B: 4 C: 5 D: 6
- #includemain(){int 13=2,k=0;while(k++&&n++>2);Pintf(”%d%d\n”,k,n.);}程序运行后的输出结果是 A: 0 2 B: 1 3 C: 5 7 D: 1 2
- 给出下面代码: k=10000 while k>1: print(k) k=k/2 A: 15 B: 14 C: 1000 D: 13
- 若已定义int k; 赋值语句 k=(k%2==0?1:0); 与( )语句不等价。 A: if (k%2==0) k=1; else k=0; B: if (k%2!=0) k=0; else k=1; C: if (k%2) k=0; else k=1; D: if (k%2) k=1; else k=0;