Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include<stdio.

h>
#include<conio.h>
#include<iostream.h>
main()
{
int x[10],i,t,j;
for(i=1;i<=10;i++)
{ cout<<" Input data ke-"<<i<<" : ";cin>>x[i];}
for(j=1;j<=10;j++)
{ for(i=1;i<=10;i++)
{ if(x[i]>x[i+1])
{t=x[i]; x[i]=x[i+1]; x[i+1]=t;}
else
continue;}
}
clrscr();
for(i=1;i<=10;i++)
{ cout<<x[i]<<endl;}
getch();
}

You might also like