.. program sort paskal ...


program sort_DATA_MAHASISWA;
uses crt;
type
data HMS=string;
var
nama,NPM,kelas : array[1..15] of dataMHS;
z,a,n : byte ;
temp : string ;
const garis='= = = = = = = = = = = = = = = = = = = = =' ;
begin
clrscr;
write('masukan data:');readln(n);
for z: = 1 to n do
begin
write('nama :');readln(nama[z]);
write('NPM :');readln(NPM[z]);
write('kelas :');readln(kelas[z]);
writeln;
end;
for z:=1 to n-1 do
begin
 for a:=z to n do
begin
temp : = nama[a];
nama[a] : = nama[z];
nama[z] : = temp;
temp : = NPM[a];
NPM[a] : = NPM[z];
NPM[z] : = temp;
temp : =kelas[a];
kelas[a] : = kelas[z];
kelas[z] : = temp;
end;
end;
end;
writeln;
writeln('setelah diurutkan:');
for z: = 1 to n do
begin
writeln;
writeln('DATA MAHASISWA');
writeln;
writeln(garis);
writeln('nama              NPM                kelas');
writeln(garis);
for z : = 1 to n do
begin
writeln(nama[z]:0,NPM[z]:16,kelas[z]:9);
end;
end;
readln
end.

Text Widget

Diberdayakan oleh Blogger.

Blog Archive

Pengikut

Mengenai Saya

Foto saya
saya bingung dengan diri saya sendiri
JIM%27S%20RUMOR

Download

JIM%27S%20RUMOR JIM%27S%20RUMOR JIM%27S%20RUMOR JIM%27S%20RUMOR