Alhamdulillahirobbil'alamin
Program keenam Algoritma & Pemrograman II Selesai
1. Screen Shot ProgramGambar 1.1 Tampilan awal program menginputkan jumlah data kemudian meinginputkan data yaitu nim, nama, dan fakultas hingga data batasan yang sudah diinput. |
Gambar 1.2 Tampilan
output setelah menginputkan data sebelumnya.
|
2. Source Code Program
Program
Linkedlist;
uses
crt;
type
ptrmhs=^mhs;
mhs=record
nim:string;
nama:string;
fakultas:string;
end;
var a :
array [1..50] of mhs;
plh, back : char;
i, n
: integer;
p
: ptrmhs;
b
: byte;
BEGIN
Begin
clrscr;
write('Input Jumlah Data : ');readln(n);
for i:=1 to n do
begin
p:=@a[i];
writeln('Data Ke-',i);
with p^ do
begin
write('
NIM : ');readln(nim);
write('
NAMA : ');readln(nama);
write('
Fakultas : ');readln(fakultas);
end;
writeln;
end;
End;
Begin
clrscr;
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeln('|
NIM | Nama Lengkap |
Fakultas |');
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
for i:= 1 to n do
begin
p:=@a[i];
with p^ do
begin
gotoxy(1,3+i);
writeln('| | | |');
gotoxy(3,3+i);writeln(nim);
gotoxy(15,3+i);writeln(nama);
gotoxy(41,3+i);writeln(fakultas);
end;
writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
readkey;
end;
End;
End.
|
0 komentar :
Posting Komentar