福建师范大学

设k为整型变量,且有以下程序段: if(k0) then if k>5 then if k2 then x:=3 else x:=4 用case语句改写上述程序,执行效果一样的是( )。Acase k of 1,2:x:=4; 3,4,5:x:=3; 8,9,10:x:=1; 6,7:x:=0 endBcase k of 1:x:=4; 2,3,4,5:x:=3; 8,9,10:x:=1; 6,7:x:=0 endCcase k of 1,2:x:=4; 3,4,5:x:=3; 9,10:x:=1; 6,

题目
设k为整型变量,且有以下程序段: if(k0) then if k>5 then if k2 then x:=3 else x:=4 用case语句改写上述程序,执行效果一样的是( )。

Acase k of 1,2:x:=4; 3,4,5:x:=3; 8,9,10:x:=1; 6,7:x:=0 end

Bcase k of 1:x:=4; 2,3,4,5:x:=3; 8,9,10:x:=1; 6,7:x:=0 end

Ccase k of 1,2:x:=4; 3,4,5:x:=3; 9,10:x:=1; 6,7,8:x:=0 end

Dcase k of 1,2,3:x:=4; 4,5:x:=3; 8,9,10:x:=1; 6,7:x:=0 end

如果没有搜索结果,请直接 联系老师 获取答案。
更多相关问题