Looping prompt till answered correctly
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I need to set a limit so the number that is inputed can not be 9 or under. with a loop that will display the prompt again if you don't answer correctly. If the number is 10 or over it will let you continue.
0 comentarios
Respuestas (1)
Walter Roberson
el 12 de Sept. de 2020
while true
prompt for input
if the input was numeric and the input was scalar and the input is not complex valued and the input is in range
break
end
end
0 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!