How do I end a program when a condition is met using only if-else-elseif statements?
古いコメントを表示
I’m making a program where I need to have the program stop asking questions if an invalid input is entered by the user. How would I do this using only if-elseif-else statements, not using commands like return or break?
2 件のコメント
Rik
2019 年 9 月 9 日
Why are you limiting yourself? Is this homework? Using keywords like return and break will make code much more readable and compact.
Sam Jenkins
2019 年 9 月 9 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!