フィルターのクリア

how to write a code using while end loop for display of number from 10 to 1 descending order ?

6 ビュー (過去 30 日間)
Without using sort

採用された回答

KSSV
KSSV 2022 年 7 月 11 日
n = 10 ;
while n ~= 1
n = n-1
end
n = 9
n = 8
n = 7
n = 6
n = 5
n = 4
n = 3
n = 2
n = 1

その他の回答 (1 件)

Hrusheekesh
Hrusheekesh 2022 年 7 月 11 日
n=11;
while n>1
n=n-1
end

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by