Feed Headline Animator

sorting in ascending order

main()
{
int l [30]; I; j;t;
for(i=l; i<=10; i++)
{
printf(“Enter a number \n”);
scanf(“%d”,&l[l]);
}
for(i=l; i<10; i++)
for(j=l+1; j<=10 ;j++)
if( l[l]>l[j])
{
t=l[i];
l[i]=l[i];
l[i]=t;
}
printf(“sorted list \n”);
for(i=1; i<=10; i++)
printf(“%d\n”,l[i]);
}


Posted by: Wasim Javed

No comments:

Post a Comment