//Procedure insertion askending
void isert_as(int data[],int jum){
int j;
float p;
for (int i=2; i<=jum; i++){
p = data[i];
j = i-1;
while ((j>0)&&(data[j] > p))
{
data[j + 1] = data[j];
j = j-1;
}
data[j+1] = p;
}
cout<<"Data setelah di urut :";
for (int i=1; i<=jum; i++){
cout<0)&&(data[j] < p))
{
data[j + 1] = data[j];
j = j-1;
}
data[j+1] = p;
}
cout<<"Data setelah di urut :";
for (int i=1; i<=jum; i++){
cout<
}
}
Minggu, 17 Januari 2010
Procedure Insert Ascending dan Descending di C++
Minggu, Januari 17, 2010
Galiarta
No comments
0 comments:
Posting Komentar