please do help me the program goes like this;

  void main()

      int x;
      int no[10];

          cout<<"input 10 numbers"<<endl;

but i have to get the sum 0f the 10 numbers in ascending order this the outtput example:


i have to switch the 10 and the 8 in order,
please help me.

Edited 3 Years Ago by mike_2000_17: Fixed formatting

OK, now you just passed from irritant to impatient spammer

Additionally, once you get the sum of the numbers, perform any sorting technique(bubble sort, selection sort, etc.) on it.

You have already started a thread with the exact same name as this one where people are trying to assist you:

Why did you start a new one? If you are done with the old one, mark it as solved so that you don't have users continuing to post to that one. Also, you have been asked by a lot of the members to start using code tags (if you don't know how to use them, ask and someone will assist you) which you have still neglected to do.

If you follow the forum rules and guidelines, you will get the help you need.


Edited 7 Years Ago by dgr231: n/a

How to sort using std

int Array[4] = {4,2,2,1};
std::sort(Array,Array+4); //now array is {1,2,3,4};
for(int i  = 0; i < 4; i++) Array[i] *=2; //now array is {1,4,6,8};
//print out the array.
This article has been dead for over six months. Start a new discussion instead.