# include
#include
void selSort(int *a,int b)
{
cout<<"Pengurutan Data Dengan Selection Sort"<
cout<<"--------------------------------------"<
cout<<"Data awal :25,57,48,37,12,92,80,33"<
int i,j,k,l;
for(i=0;i<(b-1);i++)
{
l=i;
k=a[i];
for(j=i+1;j<(b);j++);
{
if(k>a[j])
{
l=j;
k=a[j];
}
}
int temp=a[i];
a[i]=a[1];
a[1]=temp;
}
}
void elemen(int *a,int b)
{
int i=0;
for(i=0;i<10;i++)
cout<<
}
void main()
{
int x[]={25,57,48,37,12,92,80,33};
selsort(x,8);
elemen(x,8);
getch();
}
Tidak ada komentar:
Posting Komentar