#include<iostream>
using namespace std;
void sort(int a[]);
int main()
{
    int a[10],i,j,t;
    for(i=0;i<10;i++)
        cin>>a[i];
    sort(a);
    for(i=0;i<10;i++)
        cout<<a[i]<<" ";
    return 0;
}
void sort(int a[])
{
  int i,j,t;
    for(i=0;i<9;i++)
        {
            for(j=0;j<9-i;j++)
                {
                    if(a[j]<a[j+1])
                    {
                        t=a[j];
                        a[j]=a[j+1];
                        a[j+1]=t;
                    }
                }
        }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: