Write a C program to accept 10 integers from the user and arrange them in ascending order and display them.
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,temp,a[10];
//clrscr();
printf("Enter 10 integer numbers: \n");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for (i=0;i<10;i++)
{
for(j=i+1;j<10;j++)
{
if(a[i]>a[j])
{
temp=a[j];
a[j]=a[i];
a[i]=temp;
}
}
}
printf("\n\n The 10 numbers sorted in ascending order are: \n");
for(i=0;i<10;i++)
printf("%d\t",a[i]);
getch();
}