Filter löschen
Filter löschen

How can I use "OR" in this situation? I want it to show if x==2 or d~=0

1 Ansicht (letzte 30 Tage)
if x==2
disp('Given value is a prime!')
elseif d~=0
disp('Given value is a prime!')
end

Akzeptierte Antwort

jean claude
jean claude am 5 Okt. 2017
Bearbeitet: jean claude am 5 Okt. 2017
if x==2 || d~=0
disp('Given value is a prime!')
end

Weitere Antworten (0)

Kategorien

Mehr zu Discrete Math finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by