题目内容

以下错误的if语句是( )。

A. if(x>y) x++;
B. if(x==y) x++;
C. if(x D. if(x! = y) cout<

查看答案
更多问题

以下程序的输出结果为( )。int main() {int a(20), b(30),c(40);if(a>b) a=b, b=c, c=a;cout<<"a="< A. a= 20,b= 30,c= 20
B. a=20,b=40,c= 20
C. a= 30,b=40,c= 20
D. a= 30,b= 40,c= 30

以下程序的输出结果为( )。int main(){int a(1), b(3),c(5), d(4),x(0);if(a

A. 1
B. 2
C. 3
D. 6

以下程序的输出结果为( )。int main() {int x(1),a(0), b(0);switch(x) {case0: b++;case 1: a++;case2: a++; b++;}cout<<"a="< A. a=2, b=1
B. a=1, b=1
C. a=1, b=0
D. a=2,b=2

以下程序的输出结果为( )。int main(){int a(15), b(21),m(0);switch (a%3){case 0:m++ ;break;case 1:m ++;switch(b%2){default: m++;case 0: m++; break;}}cout<

A. 1
B. 2
C. 3
D. 4

答案查题题库