设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

时间:2023-01-11 17:09:58

相似题目