ini adalah code untuk membuat program perbank kan di paskal... silakan copy saja kode di bawah ini :
uses wincrt;
label menu,ulang,ulang2,ulang3,ulang4,ulang5;
type bank =record
no_rek :string;
nama :string;
alamat :string;
pekerjaan :string;
pinjam :string;
simpan :string;
end;
data=array[1..16]of bank;
var a :bank;
jml :data;
i,n :integer;
pil : char;
begin
i:=0;
menu : writeln;
clrscr;
writeln('mohamad echa putra ');
writeln('A2.1100133');
gotoxy(20,7);writeln('study kasus perBANK-an ');
gotoxy(10,8);writeln('============================');
gotoxy(10,9);writeln('1. simpan uang');
gotoxy(10,10);writeln('2. pinjam uang');
gotoxy(10,11);writeln('3 tampilan uang yang di simpan');
gotoxy(10,12);writeln('4. tampilan uang yang di pinjam');
gotoxy(10,13);writeln('==============================');
gotoxy(15,14);write('pilih : ');readln(pil);
if (pil='1')then
begin
ulang : writeln;
clrscr;
write('berapa orang yang akan menyimpan uang : ');readln(n);
for i:=1 to n do
begin
clrscr;
write('NO.REKENING : ');readln(jml[i].no_rek);
write('NAMA LENGKAP : ');readln(jml[i].nama);
write('berapa rupiah yang akan anda simpan : ');readln(jml[i].simpan);
readln;
writeln('data ',i,' telah tersimpan');
end;
writeln;
write('apakah anda ingin menyimpan uang lagi [Y/T]: '); readln(pil);
if (pil='Y') or (pil='y')then
begin
goto ulang;
end;
if(pil='T') or (pil='t') then
begin
goto menu;
end;
end;
if (pil='2')then
begin
ulang2 : writeln;
clrscr;
write('berapa orang yang akan meminjam uang : ');readln(n);
for i:=1 to n do
begin
clrscr;
write('NAMA : ');readln(jml[i].nama);
write('ALAMAT : ');readln(jml[i].alamat);
write('PEKERJAAN : ');readln(jml[i].pekerjaan);
write('JUMLAH UANG YANG DI BUTUHKAN : ');readln(jml[i].pinjam);
readln;
writeln('data telah ',i,' tersimpan...');
end;
writeln;
write('apakah anda ingin meminjam uang lagi [Y/T]: '); readln(pil);
if (pil='Y') or (pil='y')then
begin
goto ulang2;
end;
if(pil='T') or (pil='t') then
begin
goto menu;
end;
end;
if (pil='3')then
begin
ulang3 : writeln;
clrscr;
writeln('DATA-DATA YANG MENYIMPAN UANG ');
WRITELN('no,rekening |nama |jumlah_uang |');
writeln('========================================================================');
for i:=1 to n do
begin
writeln(jml[i].no_rek:10,' |',jml[i].nama:15,' | Rp.':10,jml[i].simpan,'.00');
writeln('_________________________________________________________________________');
end;
write('kembali ke menu [Y/T]: '); readln(pil);
if (pil='T') or (pil='t')then
begin
goto ulang3;
end;
if(pil='Y') or (pil='y') then
begin
goto menu;
end;
end;
if (pil='4')then
begin
ulang4:writeln;
clrscr;
writeln;
writeln('==========================================================================');
writeln('DATA-DATA YANG PINJAM UANG ');
WRITELN('nama | alamat |pekerjaan | jumlah pinjaman |');
writeln('========================================================================');
for i:=1 to n do
begin
writeln;
writeln(jml[i].nama:10,' | ',jml[i].alamat:10,' |',jml[i].pekerjaan:10,' | Rp.':10,jml[i].pinjam,'.00');
writeln('_________________________________________________________________________');
end;
write('kembali ke menu [Y/T]: '); readln(pil);
if (pil='T') or (pil='t')then
begin
goto ulang4;
end;
if(pil='Y') or (pil='y') then
begin
goto menu;
end;
end;
end.
0 komentar:
Post a Comment