0

How to compare numbers and cout them from less to most?

Can anyone help me I want to make program like this : Input : 4 4 3 2 1 Output : 1 2 3 4 Explain : Input line 1 is going to be single positive integer tell the amounts of number it's going to compare. Input line 2 is going to be a integer numbers (amounts of recieving numbers will be equal to integer at input line 1) Output will arrange number in input at line 2 from less to most. Sorry for bad gramma and thanks for help. Feel free to comment :D

23rd Aug 2017, 1:37 PM
Katsu Miyajima
Katsu Miyajima - avatar
2 Answers
+ 1
hey try to understand my code and Google all the things in it :) then add a resort to 4 3 2 1 again add a function to cout the smart_array hope that helps. https://code.sololearn.com/cj90yG42bMB8/?ref=app
23rd Aug 2017, 1:51 PM
Gunther Strauss
Gunther Strauss - avatar
+ 1
Thanks a lot! I am clearly got it.
23rd Aug 2017, 2:08 PM
Katsu Miyajima
Katsu Miyajima - avatar