Here ya go

Code:

#include <iostream>
using std::cout;
using std::cin;
#include <stdlib.h>
void number_sort(int array[], int maxnum);
int main(void)
{
// DECLARE VARIABLES
int maxnum; // This is how many numbers we will be using
int ToBeSorted; // Values which will eventually be in ascending order
int Array[100]; // Declare Array with no more than 100 elements
cout << "How many numbers do you want to sort? ";
cin >> maxnum;
cout << "\nPlease begin entering " << maxnum << " numbers.\n";
ToBeSorted = 1;
// GATHER DATA
for(ToBeSorted = 1; ToBeSorted < maxnum + 1; ToBeSorted++){
/*
Use ToBeSorted as the array subscript and loop until we have all numbers needed (maxnum).
"ToBeSorted" is set to 1 for the first number entered and since we increased ToBeSorted by
one, the same must be done to "maxnum"
*/
cout << "\nEnter number " << ToBeSorted << "\n";
cin >> Array[ToBeSorted]; // Initialize array with values
cout << "\n";
}
// DISPLAY
cout << "\n***BEFORE***\n";
for(ToBeSorted = 1; ToBeSorted < maxnum + 1; ToBeSorted++){
cout << Array[ToBeSorted] << "\n";
}
// SORTING
number_sort(Array, maxnum);
// DISPLAY
cout << "\n****AFTER****\n";
for(ToBeSorted = 1; ToBeSorted < maxnum + 1; ToBeSorted++){
cout << Array[ToBeSorted] << "\n";
}
system("PAUSE");
return 0;
}
void number_sort(int Array[], int maxnum)
{
int ToBeSorted; // Values which will eventually be in ascending order
int Copied; // If value is < than ToBeSorted Value then copy value to Storage
int Storage; // This holds values temp until copy is complete
for(ToBeSorted = 1; ToBeSorted < maxnum + 1; ToBeSorted++){ // Pass through each element in the array
for(Copied = ToBeSorted+1; Copied < maxnum + 1; Copied++){ // Loop again and move values if needed
if(Array[ToBeSorted] > Array[Copied]){ // if ToBeSorted(1) is greater than Copied(2) then do next 3 lines
Storage = Array[ToBeSorted]; // Move ToBeSorted into temp Storage
Array[ToBeSorted] = Array[Copied]; // Move the smaller number from Copied to the ToBeSorted array
Array[Copied] = Storage; // Now copy the original value we got from ToBeStored (now in Storage) to the Copied array
}
}
}
}