hi all,
I did it,
accept=input('do you want to play again, Yes(Y,y), No(N,n); \n','s');
while accept~='Y'||accept~='y'||accept~='N'||accept~='n'
accept=input('do you want to play again, Yes(Y,y), No(N,n); \n','s');
end
and it is not working. I couldn't save quastion of while loop can anyone help me ?

1 件のコメント

Stephen23
Stephen23 2020 年 5 月 4 日
編集済み: Stephen23 2020 年 5 月 4 日
Given A~=B, can you give a value of X which will make this statement false?:
X~=A || X~=B

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2020 年 5 月 3 日

0 投票

Use strcmp() or strcmpi() or ismember()
Using ~= together with "||" will fail if the user enters more than one character.

1 件のコメント

Ugur Sahin
Ugur Sahin 2020 年 5 月 4 日
thank you so much :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSignal Processing Toolbox についてさらに検索

タグ

質問済み:

2020 年 5 月 3 日

編集済み:

2020 年 5 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by