Filter löschen
Filter löschen

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

6 Ansichten (letzte 30 Tage)
Without using sort

Akzeptierte Antwort

KSSV
KSSV am 11 Jul. 2022
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

Weitere Antworten (1)

Hrusheekesh
Hrusheekesh am 11 Jul. 2022
n=11;
while n>1
n=n-1
end

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by