필터 지우기
필터 지우기

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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by