Ascending and Descending order

Submitted by Karthikeyan on Sun, 06/09/2009 - 07:24

C Program to sort in Ascending and Descending order for the given set of values and to find smallest and biggest number among them


#include 
#include 
main()
{
    int i,j,n[10],a[10],b[10],t,m;
    printf("\n\t Acending, Decending, Smallest, Biggest");
    printf("\n\t **************************************");
    printf("\n Enter the value : ");
    scanf("%d", &m);
    for(i=0; ia[j])
            {
                t=a[i];
                a[i] = a[j];
                a[j] =t;
            }
        }
     }
     for(i=0; i