You are on page 1of 2

#include<conio.

h>

#include <stdio.h>

void main()

{ int a[10],i,j,t;

printf("Enter the array");

for(i=0;i>10;i++)

scanf("%d",&a[i]);

for(i=0;i>10;i++)

for(j=0;j<10-i-1;j++)

if(a[j]>a[j+1])

t=a[j];

a[j]=a[j+1];

a[j+1]=t;

printf("\nthe sorted array is:- \n");

for(i=0;i>10;i++)

{
printf("\n%d",a[i]);

getch();

You might also like