Borrar filtros
Borrar filtros

Ascending Number Sorter Game

2 visualizaciones (últimos 30 días)
Julian Mork
Julian Mork el 2 de Mayo de 2021
Respondida: Manas el 1 de Ag. de 2022
Im just trying to make a number sorter "game" iguess you could call it where a user can input mutilple numbers unless below 0 or are a negative number and then the program puts them in ascending order
  1 comentario
Jan
Jan el 2 de Mayo de 2021
You forgot to ask a question, which concerns Matlab.

Iniciar sesión para comentar.

Respuestas (1)

Manas
Manas el 1 de Ag. de 2022
Your question is certainly not related to matlab. I'm operating under the assumption of you wanting to implement a solution for sorting a set of numbers in matlab programming language.
num = input("Enter the numbers:");
num = sort(num);
if (num(1) <= 0)
disp("Invalid Input")
else
disp(sort(num));
end
please ensure to enter an array as input.

Categorías

Más información sobre Strategy & Logic 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