There are two int variables: a and b, don’t use
“if”, “? :”, “switch”or other judgement statements,
find out the biggest one of the two numbers.
:( ( a + b ) + abs( a - b ) ) / 2
第1题:
第2题:
写出程序的输出: int i=1; switch (i%3 ) { case 0: printf("zero"); case 1: printf("one"); case 2: printf("two"); }
第3题:
在switch语句中,switch后面括号内的表达式的类型不能是____。
A.double
B.long
C.char
D.int
第4题:
在switch语句中,switch后面括号内的表达式的类型不能是()
A.byte
B.long
C.char
D.int
第5题:
1、针对下列程序段,需要()个测试用例才可以满足语句覆盖的要求。 switch (value ) { case 0: other = 30; break; case 1: other = 50; break; case 2: other = 300; case 3: other = other/value; break; default: other = other * value; }
A.2
B.3
C.4
D.5