Borrar filtros
Borrar filtros

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

6 visualizaciones (últimos 30 días)
Without using sort

Respuesta aceptada

KSSV
KSSV el 11 de Jul. de 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

Más respuestas (1)

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

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by