Selamat Datang Di AbbyMaster's


PENGURUTAN (Program Keduaku) :-)  

Ditulis oleh Abby

uses crt;
var nama,nim:array [1..10] of string[15];
tgs,quiz,uts,uas:array [1..10] of integer;
na:array [1..10] of real;
idx:array [1..10] of char;
menu,i,j,y,data,n:byte;

procedure masuk;
var q,b,r,p,a,c : byte;
np,kk:string[10];

begin
textbackground(red);
textcolor(white);
clrscr;
q:=65; b:=25; r:=1; p:=20;
while r<=44 do
begin
r:=r+1;
q:=q-1;
p:=p+1;
if (r mod 2 = 0) then
begin
gotoxy(p,7);
write('Û');
delay(75);
end
else if (r mod 2 = 1) then
begin
gotoxy(q,17);
write('Û');
delay(75);
end;
end;
a:=0; b:=18; c:=7;
while a<=9 do
begin
a:=a+1;
b:=b-1;
c:=c+1;
if (c mod 2 = 0) then
begin
gotoxy(20,c);
write('Û');
delay(75);
end
else if (c mod 2 = 1) then
begin
gotoxy(64,b);
write('Û');
delay(75);
end;
end;
textcolor(lightgreen+blink);
gotoxy(36,12);write('SELAMAT DATANG'); delay(1000);
textcolor(lightblue);
gotoxy(33,20);write('Nama : Moh. Habibi');
gotoxy(33,22);write('NIM : 10508656');
gotoxy(33,24);write('Kelas : MI - 14');
delay(2000);
repeat
clrscr; textcolor(blue);
gotoxy(20,9); writeln('SILAHKAN MASUKKAN NAMA PENGGUNA DAN KATA KUNCI');
textcolor(lightgreen);
gotoxy(30,12);write('Nama Pengguna : '); readln(np);
gotoxy(30,14);write('Kata Kunci : '); textcolor(red); readln(kk);
until (kk)='habibi';
end;

procedure tambah;
begin
textbackground(red);
textcolor(white);
clrscr;
gotoxy(20,2) ;writeln('ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄĶ');
gotoxy(20,3); writeln('º Banyak Data Yang Akan Dimasukkan ³ º');
gotoxy(20,4); writeln('ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄĶ');
gotoxy(57,3); readln(n);
for i:=data to (n+data-1) do
begin
clrscr;
gotoxy(35,7); write('Data ke-',i);
gotoxy(31,9); write('Nama : '); readln(nama[i]);
gotoxy(31,11); write('NIM : '); readln(nim[i]);
gotoxy(31,14); write('Nilai Tugas : ');readln(tgs[i]);
gotoxy(31,16); write('Nilai Quiz : '); readln(quiz[i]);
gotoxy(31,18); write('Nilai UTS : '); readln(uts[i]);
gotoxy(31,20); write('Nilai UAS : '); readln(uas[i]);
na[i]:= (10/100*tgs[i])+(20/100*quiz[i])+(30/100*uts[i])+(40/100*uas[i]);
if (na[i]>85) and (na[i]<=100) then
idx[i]:='A'
else if (na[i]>70) and (na[i]<=85) then
idx[i]:='B'
else if (na[i]>60) and (na[i]<=70) then
idx[i]:='C'
else if (na[i]>50) and (na[i]<=60) then
idx[i]:='D'
else if (na[i]<=50) then
idx[i]:='E';
end;
data := i+1;
end;

procedure lihat;
begin
clrscr;
gotoxy(31,2); write('DAFTAR NILAI MAHASISWA');
gotoxy(1,4); writeln('ÕÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÍÍÍÍ͸');
gotoxy(1,5); writeln('³ ³ ³ ³ N I L A I ³ ³');
gotoxy(1,6); writeln('³ NO ³ N A M A ³ N I M ÃÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÂÄÄÄÄÄÄÄ´ INDEX ³');
gotoxy(1,7); writeln('³ ³ ³ ³ TUGAS ³ QUIZ ³ UTS ³ UAS ³ AKHIR ³ ³');
gotoxy(1,8); writeln('ÆÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍØÍÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍØÍÍÍÍÍÍÍØÍÍÍÍÍÍ͵');
y:= 8;
for i:=1 to data-1 do
begin
y:= y+1;
gotoxy(1,y); write('³ ',i:2,' ³ ',nama[i]:15,' ³ ',nim[i]:9,' ³ ',tgs[i]:3,' ³ ',quiz[i]:3,
' ³ ',uts[i]:3,' ³ ',uas[i]:3);
writeln(' ³ ',na[i]:5:2,' ³ ',idx[i],' ³');
end;
gotoxy(1,y+1);writeln('ÔÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÏÍÍÍÍÍÍÍÏÍÍÍÍÍÍ;');
readln;
end;

procedure urut;
var plh:byte;
temp1,temp2:string;
temp3:real;
temp4,temp5,temp6,temp7:integer;
temp8:char;
begin
clrscr;
if n=0 then
begin
gotoxy(33,10); writeln('Data Masih Kosong');
gotoxy(27,12); writeln('Masukkan Data Terlebih Dahulu');
gotoxy(39,14); write(' ');
gotoxy(27,23); textcolor(yellow);textbackground(black); write('[ Tekan ENTER Untuk Ke MENU ]');
readln;
end else
begin
gotoxy(27,3); writeln('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
gotoxy(27,4); writeln('º º');
gotoxy(27,5); writeln('º URUTKAN DATA BERDASARKAN º');
gotoxy(27,6); writeln('º º');
gotoxy(27,7); writeln('ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹');
gotoxy(27,8); writeln('º º');
gotoxy(27,9); writeln('º 1. Nama Mahasiswa º');
gotoxy(27,10); writeln('º º');
gotoxy(27,11); writeln('º 2. NIM Mahasiswa º');
gotoxy(27,12); writeln('º º');
gotoxy(27,13); writeln('º 3. Nilai Akhir º');
gotoxy(27,14); writeln('º º');
gotoxy(27,15); writeln('ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄĶ');
gotoxy(27,16); writeln('º P I L I H ³ º');
gotoxy(27,17); writeln('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍÍÍÍͼ');
gotoxy(50,16); readln(plh);
if plh=1 then
begin
for i:=1 to data-2 do
for j:=i+1 to data-1 do
if (nama[i]) > (nama[j]) then
begin
temp1:=nama[i];
temp2:=nim[i];
temp3:=na[i];
temp4:=tgs[i];
temp5:=quiz[i];
temp6:=uts[i];
temp7:=uas[i];
temp8:=idx[i];
nama[i]:=nama[j];
nim[i]:=nim[j];
na[i]:=na[j];
tgs[i]:=tgs[j];
quiz[i]:=quiz[j];
uts[i]:=uts[j];
uas[i]:=uas[j];
idx[i]:=idx[j];
nama[j]:=temp1;
nim[j]:=temp2;
na[j]:=temp3;
tgs[j]:=temp4;
quiz[j]:=temp5;
uts[j]:=temp6;
uas[j]:=temp7;
idx[j]:=temp8;
end;
end else
if plh=2 then
begin
for i:=1 to data-2 do
for j:=i+1 to data-1 do
if (nim[i]) > (nim[j]) then
begin
temp1:=nama[i];
temp2:=nim[i];
temp3:=na[i];
temp4:=tgs[i];
temp5:=quiz[i];
temp6:=uts[i];
temp7:=uas[i];
temp8:=idx[i];
nama[i]:=nama[j];
nim[i]:=nim[j];
na[i]:=na[j];
tgs[i]:=tgs[j];
quiz[i]:=quiz[j];
uts[i]:=uts[j];
uas[i]:=uas[j];
idx[i]:=idx[j];
nama[j]:=temp1;
nim[j]:=temp2;
na[j]:=temp3;
tgs[j]:=temp4;
quiz[j]:=temp5;
uts[j]:=temp6;
uas[j]:=temp7;
idx[j]:=temp8;
end;
end else
if plh=3 then
begin
for i:=1 to data-2 do
for j:=i+1 to data-1 do
if (na[i]) < (na[j]) then
begin
temp1:=nama[i];
temp2:=nim[i];
temp3:=na[i];
temp4:=tgs[i];
temp5:=quiz[i];
temp6:=uts[i];
temp7:=uas[i];
temp8:=idx[i];
nama[i]:=nama[j];
nim[i]:=nim[j];
na[i]:=na[j];
tgs[i]:=tgs[j];
quiz[i]:=quiz[j];
uts[i]:=uts[j];
uas[i]:=uas[j];
idx[i]:=idx[j];
nama[j]:=temp1;
nim[j]:=temp2;
na[j]:=temp3;
tgs[j]:=temp4;
quiz[j]:=temp5;
uts[j]:=temp6;
uas[j]:=temp7;
idx[j]:=temp8;
end;
end;
gotoxy(3,19);
writeln('±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±');
for i:=1 to 76 do
begin
delay(70);
gotoxy(2+i,19);write('Û');
end;
gotoxy(30,21); textcolor(blue+blink); writeln('DATA TELAH DIURUTKAN !!');
gotoxy(27,23); textcolor(yellow);textbackground(black); write('[ Tekan ENTER Untuk Ke MENU ]');
readln;
end;
end;

procedure keluar;
var q,b,r,p,a,c : byte;
begin
textbackground(red);
textcolor(white);
clrscr;
q:=65; b:=25; r:=1; p:=20;
while r<=44 do
begin
r:=r+1;
q:=q-1;
p:=p+1;
if (r mod 2 = 0) then
begin
gotoxy(p,7);
write('Û');
delay(75);
end
else if (r mod 2 = 1) then
begin
gotoxy(q,17);
write('Û');
delay(75);
end;
end;
a:=0; b:=18; c:=7;
while a<=9 do
begin
a:=a+1;
b:=b-1;
c:=c+1;
if (c mod 2 = 0) then
begin
gotoxy(20,c);
write('Û');
delay(75);
end
else if (c mod 2 = 1) then
begin
gotoxy(64,b);
write('Û');
delay(75);
end;
end;
textcolor(lightgreen);
gotoxy(33,10);write('T E R I M A K A S I H');
gotoxy(33,12);write(' D A N');
gotoxy(33,14);write('S A M P A I J U M P A');
delay(2000);
end;

{Program Utama}
begin
masuk;
data := 1;
repeat
textbackground(red);
textcolor(white);
clrscr;
gotoxy(30,2); writeln('DATA NILAI MAHASISWA');
writeln;
gotoxy(27,6); writeln('ÛßßßßßßßßßßßßßßßßßßßßßßßßÛ');
gotoxy(27,7); writeln(' Û Û');
textcolor(yellow+blink); gotoxy(35,7); writeln('M E N U');
textcolor(white);
gotoxy(27,8); writeln('ÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ');
gotoxy(27,9); writeln(' Û Û');
gotoxy(27,10);writeln('Û 1. Tambah Data Û ');
gotoxy(27,11);writeln(' Û Û');
gotoxy(27,12);writeln('Û 2. Lihat Data Û ');
gotoxy(27,13);writeln(' Û Û');
gotoxy(27,14);writeln('Û 3. Urutkan Data Û ');
gotoxy(27,15);writeln(' Û Û');
gotoxy(27,16);writeln('Û 4. Keluar Û ');
gotoxy(27,17);writeln('ºÛÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛº');
gotoxy(27,18); writeln('º º');
gotoxy(27,19); writeln('ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄĶ');
gotoxy(27,20); writeln('º P I L I H ³ º');
gotoxy(27,21); writeln('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏÍÍÍÍͼ');
gotoxy(49,20); readln(menu);

if menu=1 then
tambah
else if menu=2 then
lihat
else if menu=3 then
urut;
until menu=4;
keluar;
end.

This entry was posted on 21:56:00 and is filed under . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

0 komentar

Terima Kasih Atas Kunjungannya di AbbyMaster's


IP