How many times will this while loop code run
Mostrar comentarios más antiguos
How many times does the following code run?
total = 0;
while (total < 100)
total = total + 5;
disp(total)
end;
I thought it was 20, but I am wrong?
1 comentario
Jan
el 9 de Mzo. de 2017
To be exact, the code runs one time only.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!