Pandapotan Record


uses wincrt;
Type mahasiswa = record
Nama: string[15];
Nim:string[10];
IPK: real;
end;
Var Mhs: Mahasiswa;
type
tipesiswa=record
Nama: string[15];
end;
begin
write(‘nama : ‘);readln(mhs.nama);
write(‘nim : ‘);readln(mhs.nim);
write(‘IPK : ‘);readln(mhs.IPK);
writeln;
writeln(‘Nama anda:’,mhs.nama);
writeln(‘nim anda:’,mhs.nim);
writeln(‘IPK anda:’,mhs.IPK:4:2);

end.


Leave a Reply