Hi y'all!
I need to sort an input of integers, long as we wish (not defined, depending on the user), which ends up by -1, and print it to the screen sorted. I can't think of anything that is simple enough to use (a beginners level, all we learned in the 4 lectures that we had was to the loops level, nothing too complicated). I know how to do it with arrays, or lists etc., but not without it. Any suggestion?
Thanks
YaelGD
0
Newbie Poster
Recommended Answers
Jump to PostIf you have variables a, b and c it would be not too difficult with some if statements. But the more variables you have the greater difficulty to sort them without an array or linked list.
Jump to Post>Any suggestion?
I'd suggest that you confirm the need to do this without any kind of list. This sounds more like make-work with unreasonable restrictions than a beginner's project. Since you claim that it's a beginner's project, it's more likely that you just didn't fully understand the requirements and have …
All 7 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Narue
5,707
Bad Cop
Team Colleague
YaelGD
0
Newbie Poster
ArkM
1,090
Postaholic
YaelGD
0
Newbie Poster
jephthah
1,888
Posting Maven
Narue
5,707
Bad Cop
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.