#include<stdio.h>
#include<conio.h>	

int main()
{
	clrscr();	
    	int N,K,L,A[100],T;
	printf("Enter the value of N = ");
	scanf("%d", &N);

	printf("\nEnter values: \n");

	for (K=1; K<=N; K++)
	{
	   printf("Give value = ");
	   scanf("%d",&A[K]);
	}

	for(K=1; K<=N; K++)
	{
		for (L=1; L<=N-K; L++)
		{
			if(A[L]>A[L+1])
			{
				T=A[L];
				A[L]=A[L+1];
				A[L+1]=T;
			}
		}
	}

	printf("\nOutput :\n");

	for (K=1; K<=N; K++)
	{
		printf("%d ",A[K]);
	}

	getch();
}
