Sort and print array in descending order - C

C program to read an array of 10 integer and sort it in descending order.

Solution:

#include <stdio.h>
int main()
{
     int a[7],i,j,t;
     printf("Enter 7 Numbers:\n");
     for(i=0;i<7;i++)
          scanf("%d",&a[i]);
     for(i=0;i<6;i++)
          for(j=i+1;j<7;j++)
               if(a[i]<a[j])
               {
                    t=a[i];
                    a[i]=a[j];
                    a[j]=t;
               }
     printf("\nNumbers in Descending Order:\n");
     for(i=0;i<7;i++)
          printf("%d ",a[i]);
     return 0;
}


Output:

sort descending order