Well I wrote this programme, hoping what I wrote is a lenear sorting algorithm
if it's not pls tell me :-O
#include <iostream>
#include <string>
using namespace std;
int main()
{
int a[10];
int num = 0;
int number = 0;
cout << "Enter 10 int..." << endl;
for (int i = 0; i < 10; i++)
{
cout << i << " : ";
cin >> number;
a[i] = number;
}
cout << endl;
for (int j = 0; j < 10; j++)
{
for (int i = 0; i < 10; i++)
{
if(a[j] < a[i - 1])
{
num = a[i - 1];
a[i - 1] = a[j];
a[j] = num;
}
else continue;
}
}
for (int i = 0; i < 10; i++)
{
cout << a[i] << " " ;
}
}