Alhamdulillahirobbil'alamin akhirnya program pertama praktikum ALPRO II Selesai.
1. Screenshot Program :
2. Source Code Program
Program
Database;
uses
crt;
Type
Mahasiswa = record
Nama
: String;
NIM
: String;
Nilai
: Integer;
End;
Var
DataMahasiswa : array [1..50] of Mahasiswa;
N,I,J : integer;
Plh, Back : char;
Procedure
input;
Begin
j:=0;
clrscr;
writeln('Daftar Mahasiswa');
writeln('~~~~~~~~~~~~~~~~');
Write('Inputkan Jumlah Mahasiswa : ');
readln(N);
writeln;
Clrscr;
For J:=1 to n do
Begin
With Datamahasiswa[j] do
begin
Writeln('Data Mahasiswa ke-',j);
writeln('~~~~~~~~~~~~~~~~~~~');
Write('Nama : '); readln(Nama);
Write('NIM : '); readln(NIM);
Write('Nilai : '); readln(Nilai);
writeln;
end;
End;
End;
Procedure
Output;
Begin
Clrscr;
j:=0;
writeln(' Kartu Hasil Studi ( KHS ) Tahun
2015 ');
writeln(' Mahasiswa S1 Ilmu Komputer ');
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeln('~ No ~ Nama Lengkap ~
NIM ~ Nilai ~');
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
For J:=1 to n do
Begin
With Datamahasiswa[j] do
begin
Gotoxy(1,j+5); Writeln('~');
Gotoxy(3,j+5); Writeln(j);
Gotoxy(6,j+5); Writeln('~');
Gotoxy(8,j+5); Writeln(Nama);
Gotoxy(28,j+5); Writeln('~');
Gotoxy(30,j+5); Writeln(NIM);
Gotoxy(40,j+5); Writeln('~');
Gotoxy(43,j+5); Writeln(Nilai);
Gotoxy(48,j+5); Writeln('~');
end;
End;
Gotoxy(1,j+6);
Writeln('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
End;
Procedure
menu;
Begin
Repeat
clrscr;
writeln
('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeln ('| Menu Data Mahasiswa |');
writeln
('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
writeln ('| 1. Input Data |');
writeln ('| 2. Output Data |');
writeln ('| 3. Keluar |');
writeln
('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
write
(' Pilihan Menu : '); read(plh);
Case plh of
'1' : begin
input;
end;
'2' : begin
Output;
readkey;
end;
'3' : exit;
Else
Clrscr;
write('Mohon Maaf, Pilihan tidak tersedia
!!!');
readkey;
end;
Clrscr;
write('Ingin kembali kemenu utama? : ');
readln(back);
until ((back='n') or (Back='N'));
readkey;
end;
BEGIN
clrscr;
menu;
readkey;
END.
|
mantap gan
BalasHapuscoba ini juga gan http://omniscience-id.blogspot.com/2015/03/program-pascal-program-biodata.html