FIND THE ANSWERS

How to make a program that will arrange 10 inputed arrays numbers in ascending order?

Answer this question

  • How to make a program that will arrange 10 inputed arrays numbers in ascending order?


Answers

Answer #1 | 20/12 2013 05:39
Lucky you. I'm learning about C++ using the nano text editor. IDEs are for wimps. XD Anyway, there are two ways to swap array elements. You can swap individual elements using a swap function, or arrange them using a sort procedure. The easiest way is to use a sort function (I find it the easiest to understand). You can use a void function, like so: void sort ( int array[], int SIZE ); Since you have 10 numbers, the constant SIZE = 10. You can then use a for loop to arrange the element values in ascending order. An example for loop would be: for ( int index = 0; index < SIZE; index++ ) { .... You can find more info here: http://www.cplusplus.com/reference/algorithm/sort/?kw=sort Hopefully you know what goes in the for loop. I don't wanna do your homework for you. ;)
Positive: 21 %

Possible answer

How to find Mode with Arrays? ... Get the 10 numbers from the ... that will input a list or array of number and arrange them in ascending order.Then ...
Read more
Positive: 21 %
4.2 Sorting and Searching. The sorting problem is to rearrange an array of items in ascending order. ... of n real numbers ...
Read more
Positive: 16 %
Understanding Array Sorting in Visual Basic Tutorial. ... Sample Program 1 . ... Again the values are sorted in ascending order.
Read more
Positive: 2 %
Arrays in C Programming. ... All elements of any given array must be of the same type i.e we can’t have an array of 10 numbers, ... make a program that ...
Read more
Positive: 10 %

Show more results