How can I use "OR" in this situation? I want it to show if x==2 or d~=0
1 次查看(过去 30 天)
显示 更早的评论
if x==2
disp('Given value is a prime!')
elseif d~=0
disp('Given value is a prime!')
end
0 个评论
采纳的回答
jean claude
2017-10-5
编辑:jean claude
2017-10-5
if x==2 || d~=0
disp('Given value is a prime!')
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Math 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!