[求助]简单的 switch、case语句,总是不能判断条件??
简单的Switch、case语句,总是不能判断条件
clear;clc;
s=input('请输入数字');
switch s
case s==10
r='十环';
case s<10&s>=0
r='不好';
otherwise
r='不可能';
end,s,r
当我运行,并且输入10,给出结果:不可能 ,请教各位,哪里写错了?
[此贴子已经被作者于2006-4-23 19:21:06编辑过]
简单的Switch、case语句,总是不能判断条件
clear;clc;
s=input('请输入数字');
switch s
case s==10
r='十环';
case s<10&s>=0
r='不好';
otherwise
r='不可能';
end,s,r
[此贴子已经被作者于2006-4-23 19:21:06编辑过]
2006-04-23 19:20
2006-04-24 00:13
2006-04-24 17:28
2006-04-28 08:43
2006-04-28 08:47

2006-05-12 21:48

2006-05-12 21:57