回答 (2 件)

KSSV
KSSV 2020 年 4 月 4 日

1 投票

Read about input and unique.
Image Analyst
Image Analyst 2020 年 4 月 4 日

1 投票

Hint: call input() or inputdlg() to get the numbers, and unique() inside a while statement to check for validity
while length(numbers) ~= length(unique(numbers)) && sum(numbers > 0) ~= 5

1 件のコメント

Image Analyst
Image Analyst 2020 年 4 月 4 日
Is this homework that you have to turn in? Are you allowed to turn in my work as your own?

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

カテゴリ

ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索

質問済み:

2020 年 4 月 4 日

編集済み:

2020 年 4 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by