필터 지우기
필터 지우기

Ascending Number Sorter Game

조회 수: 2 (최근 30일)
Julian Mork
Julian Mork 2021년 5월 2일
답변: Manas 2022년 8월 1일
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
Jan
Jan 2021년 5월 2일
You forgot to ask a question, which concerns Matlab.

댓글을 달려면 로그인하십시오.

답변 (1개)

Manas
Manas 2022년 8월 1일
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.

카테고리

Help CenterFile Exchange에서 Strategy & Logic에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by