Rabu, 12 Desember 2012

MINIMUM SORT ASCENDING

Ilustrasi Minimum Sort (Ascending):
Algoritma Minimum Sort (Ascending):
Contoh Program Minimum Sort (Ascending):
#include<stdio.h>
int main(){
 int a[10]={5,1,3,2,4,0,6,7,8,9};
 int temp, imin, i, j;
 for(i=0;i<10;i++){
  imin = i+1;
  for(j=i;j<10;j++){
   if(a[j] < a[imin]){
    imin = j;
   }
  }
  if(imin != i){
   temp = a[i];
   a[i] = a[imin];
   a[imin] = temp;
  }
 }
 for(j=0;j<10;j++){
  printf("%d ",a[j]);
 }
 return 0;
}

Sumber : http://www.informatikaduniaku.blogspot.com/

1 komentar:

taletataft mengatakan...

Titanium Hip
Titanium Hip was created by the black oxide vs titanium drill bits creative agency 2019 ford fusion hybrid titanium of titanium hip Chef Chen Ji, of the Chinese Restaurant, in 2014. titanium tent stove It's one of the most beautiful pieces of art in China. The titanium mens wedding band artworks $23.99 · ‎In stock

Posting Komentar