Follow Us:

RSS

Launcher - Converted By Tofa90

For a while this website will be linked to tofa90, Thanks! Theme designed by Tofa90 Template.

Launching
comeback
launchpad
Editor By Moh Tofariyanto. Diberdayakan oleh Blogger.

Terpopuler

Info

Minggu, 14 Oktober 2012

Penyelesain tugas1 struktur data


#include <iomanip.h>
#include <iostream.h>
#include <conio.h>
void SelectionSort(int Array[], const int Size){
int i,j,temp;
for(i=0;i<Size; i++){
                for(j=i+1;j<Size;j++){
                                if(Array[i]>Array[j]){
temp=Array[j];
Array[j]=Array[i];
Array[i]=temp;}
}
}
}


void main(){
                int Numlist[8]={22,2,25,212,5,34,75,42};
int temp;
cout<<"Data sebelum diurutkan : \n";
for(int d=0;d<8;d++){
                cout<<setw(3)<<Numlist[d];}
cout<<"\n\n";
SelectionSort(Numlist,8);
cout<<"Data Setelah Diurutkan :\n";
for(int iii=0;iii<8;iii++)
cout<<setw(3)<<Numlist[iii]<<endl<<endl;
getch();
}

 download scriptnya dibawah
    Download jhack uim
     Hasil

0 komentar: