matlab中else if语句只执行了第二句,程序没问题,逻辑上哪里有错误?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/14 14:55:47
matlab中else if语句只执行了第二句,程序没问题,逻辑上哪里有错误?
weight=input('the weight of your purse:');
if weight
weight=input('the weight of your purse:');
if weight
weight=input('the weight of your purse:');
if weight2&&weight=70&&weight100;%weight>100可省略
disp('too heavy to send!');
end
end
end
可以改进一下:
weight=input('the weight of your purse:');
if weight2&&weight=70&&weight100;%%%weight>100;可省略
disp('too heavy to send!');
end
再问: 恩,看来我的错误在于‘2
if weight2&&weight=70&&weight100;%weight>100可省略
disp('too heavy to send!');
end
end
end
可以改进一下:
weight=input('the weight of your purse:');
if weight2&&weight=70&&weight100;%%%weight>100;可省略
disp('too heavy to send!');
end
再问: 恩,看来我的错误在于‘2
matlab中else if语句只执行了第二句,程序没问题,逻辑上哪里有错误?
matlab if else语句为什么只运行最后一个,急
在mathematic中有没有else语句?mathematic中的if语句中出现需要执行好几步时怎么办
if语句中第二个用if 与 else if有什么不同?
这是一个matlab程序,为什么这个程序只运行else后面的语句,
matlab: 为什么我的程序中for循环只执行了一次? 谢谢
matlab语句执行,这个公式哪里有拼写问题?
matlab程序if语句用法
C语言中if判断语句为什么是错误的仍执行了它下面的语句?
matlab 的if 语句执行不了
帮忙改一下matlab语句,一直说第二个else 错误
Matlab程序:错误在哪里