How can I use "OR" in this situation? I want it to show if x==2 or d~=0
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bror Markus Salmelin
el 5 de Oct. de 2017
Editada: jean claude
el 5 de Oct. de 2017
if x==2
disp('Given value is a prime!')
elseif d~=0
disp('Given value is a prime!')
end
0 comentarios
Respuesta aceptada
jean claude
el 5 de Oct. de 2017
Editada: jean claude
el 5 de Oct. de 2017
if x==2 || d~=0
disp('Given value is a prime!')
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Discrete Math en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!