Hi i think the way to do this is a while loop im just not sure about part of it:
whenever the script is an odd number , i would like the script to keep asking for user input
n=0
while (dont know what to put here)
n=n+1
thank you

 채택된 답변

TADA
TADA 2019년 1월 25일

0 개 추천

input Function Documentation
modulo Function Documentation, Or You Can Search In Google And Find At Least Half A Dozen Links To File Exchange Implementations Of Iseven/isodd (Haven't Looked At The Codes, but It's Very Simple To Implement)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2019년 1월 25일

편집:

2019년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by