以下是while语句的基本形式: while(表达式){语句:} 其中“表达式”()。
A.必须是逻辑表达式
B.必须是关系表达式
C.必须是逻辑表达式或关系表达式
D.可以是任意合法的表达式
A.必须是逻辑表达式
B.必须是关系表达式
C.必须是逻辑表达式或关系表达式
D.可以是任意合法的表达式
● 下面的一段C 程序中,循环体语句 (59) 退出循环。
unsigned char size;
int aa;
size = 100;
while (size-- >= 0) {
aa += size;
}
(59)
A. 执行100次后
B. 执行101次后
C. 执行99次后
D. 死循环,不会
● 下面的一段C 程序中,循环体语句 (59) 退出循环。
unsigned char size;
int aa;
size = 100;
while (size-- >= 0) {
aa += size;
}
A. 执行100次后
B. 执行101次后
C. 执行99次后
D. 死循环,不会
● 程序设计语言中(34) 。
(34)
A. while循环语句的执行效率比do-while循环语句的执行效率高
B. while 循环语句的循环体执行次数比循环条件的判断次数多1.而do-while语句的循环体执行次数比循环条件判断次数少1
C. while 语句的循环体执行次数比循环条件的判断次数少1,而 do-while语句的循环体执行次数比循环条件的判断次数多1
D. while 语句的循环体执行次数比循环条件的判断次数少1,而 do-while语句的循环体执行次数等于循环条件的判断次数
以下选项中循环结构合法的是()。
A.while(inti<7)(i++;system.out.println("iis"+i);}
B.intj=3;while(j){system.out.println("jis"+j);}
C.intj=0;for(intk=0;j+k!=10;j++,k++){system.out.println("jis"+j+"kis"+k);}
D.intj=0;do{system.out.println("jis"+j++);if(j==3){continueloop;}}while(j<10);
有以下程序: #include <stdio.h> main() { int s=0,a=1,n; scanf("%d",&n); do {s+=1;a=a-2;} while(a!=n); printf("%d\n",s); } 若要使程序的输出值为2,则应该从键盘给n输入的值是()。
A.-1
B.-3
C.-5
D.0
以下能够正确计算n!的程序是
A.Private Sub Command1_Click() n=5: x=1 Do x=x*i i=i+1 Loop While i<n Print x End Sub
B.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i<n Print x End Sub
C.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i<= n Print x End Sub
D.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
His supposition is good in theory _____ cannot be put into practice.
A、and
B、or
C、but
D、while
I go to the movies occasionally at the weekends.
A.now and again
B.frequently
C.once in a while
D.here and there
The fact () he succeeded in the experiment pleased everybody.
A、blank
B、which
C、that
D、while
While dealing with the terrorists, the President actually ______.
A.lost control of the White House
B.paid little attention to the safety of his wife and daughter
C.killed almost all the terrorists
D.made the best use of his mobile phone
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!