Algoritma :
Deklarasi:
I, j, max, temp integer
Deskripsi :
Max <------- input
For (i=1;i<=max;i++) then
Write(‘ Masukkan data ke- ‘I’)
for(i=1;i<=max;i++) then
write(‘data[i]’)
for(i=1;i<=max;i++) then
for(j=1;j<=max;j++) then
if(data[i]>data[j]) then
write(‘temp=data[i])
data[i] <------- data[j];
data[j] <------- temp;
I, j, max, temp integer
Deskripsi :
Max <------- input
For (i=1;i<=max;i++) then
Write(‘ Masukkan data ke- ‘I’)
for(i=1;i<=max;i++) then
write(‘data[i]’)
for(i=1;i<=max;i++) then
for(j=1;j<=max;j++) then
if(data[i]>data[j]) then
write(‘temp=data[i])
data[i] <------- data[j];
data[j] <------- temp;
Program C++ :
0 comments:
Posting Komentar