所有的if…then…else…语句都可以用select case语句替代。()
[]
[]
A、if x>0 then y=1 else if x=0 then y=0 else y= -1 B、if x>0 then y=1 else if x<0 then y= -1 else y=0 C、if x>=0 then if x=0 then y=0 else y= -1 else y=1 D、if x<>0 then if x<0 then y= -1 else y= 1 else y=0
A、if后面只能带一条执行语句,如果你需要执行多条语句,则需要把它们放到话括号里面; B、switch语句与if…else if…else语句在功能上是对等的,二者可以互换; C、switch结构中需要加入break语句,否则不能做到在执行完一个case之后就调处switch结构; D、if…else if…else结构是一种特殊的多元选择结构,它与if…else结构虽然形式上类似,但彼此没有任何关系; E、if后面只能带一条执行语句,如果你需要执行多条语句,必须以函数的形式完成;
A、跳过if程序块中congtinue下面的语句,执行if块外面的语句 B、跳过整个函数中下面所有的语句,跳出整个函数 C、跳过for循环中continue下面的语句,直接开始新的循环 D、如果if程序块中有else块,则跳过else块,执行下面的语句