struktur program:
program nilai_mahasiswa_si;
Uses Crt;
Type score = Record
no : integer;
kode : string;
matkul : string;
sks : integer;
uas
: integer;
tugas : integer;
kuis : integer;
akhir : real;
huruf : string;
bobot : integer;
End;
Var
mhs : Array[1..50] of score;
I
: Integer;
n, bob
: integer;
jmlsks, jmlbobot, ambil :
integer;
nim, nama, jur : string;
ip : real;
--------------------------------------------------------------------------------------
procedure input;
begin
clrscr;
write('berapa mata kuliyah
yang diambil = ');
readln(n);
clrscr;
gotoxy(12,1); writeln(' KHS (KARTU HASIL STUDY)');
gotoxy(12,2);
writeln('SEKOLAH TINGGI MENEJEMEN INFORMASI DAN KOMUNIKASI');
gotoxy(12,3); writeln(' EL-RAHMA YOGYAKARTA');
gotoxy(1, 5);Write('NIM = ');readln(nim);
gotoxy(1, 6);Write('NAMA = ');readln(nama);
gotoxy(1,
7);Write('JURUSAN = ');readln(jur);
gotoxy(1,
8);Writeln('+---+-----+-------------------+---+---+---+-----+----+-----+-----+-----+');
gotoxy(1, 9);Writeln('|NO
|KODE |NAMA MATA KULIYAH |SKS|UAS|UTS|TUGAS|KUIS|AKHIR|HURUF|BOBOT|');
gotoxy(1,
10);Writeln('+===+=====+===================+===+===+===+=====+====+=====+=====+=====+');
end;
--------------------------------------------------------------------------------------
procedure hitung;
begin
For i := 1 To n Do
Begin
With mhs[i] Do
Begin
gotoxy(1, 10+i); Write('|',i);
gotoxy(5, 10+i); write('|'); readln(kode);
gotoxy(11, 10+i); write('|'); readln(matkul);
gotoxy(31, 10+i); write('|'); readln(sks);
gotoxy(35, 10+i); write('|'); readln(uas);
gotoxy(39, 10+i); write('|'); readln(uts);
gotoxy(43, 10+i); write('|'); readln(tugas);
gotoxy(49, 10+i); write('|'); read(kuis);
Begin
akhir := (uas + Uts + tugas + kuis)
/ 4;
If (akhir <= 100) and (akhir
>= 85) Then huruf := 'A' Else
If (akhir < 85) and (akhir >=
65) Then huruf := 'B' Else
If (akhir < 65) and (akhir >=
45) Then huruf := 'C' Else
If (akhir < 45) and (akhir >=
25) Then huruf := 'D' Else
huruf :='E';
End;
gotoxy(54, 10+i);
write('|', akhir:0:2);
gotoxy(60, 10+i);
write('|', huruf);
begin
if huruf = 'A' then bob := 4 else
if huruf = 'B' then bob := 3 else
if huruf = 'C' then bob := 2 else
if huruf = 'D' then bob := 1 else
bob := 0;
end;
bobot := sks * bob;
gotoxy(66, 10+i); write('|', bobot);
gotoxy(72, 10+i); write('|');
jmlsks := jmlsks + sks;
jmlbobot := jmlbobot + bobot;
begin
ip := jmlbobot /
jmlsks;
if (ip > 3.0) and
(ip <= 4.0) then ambil := 24 else
if (ip <= 3.0) and
(ip > 2.5) then ambil := 21 else
if (ip <= 2.5) and
(ip > 1.5) then ambil := 18 else
ambil := 15;
end;
End;
readln;
end;
readln;
Write('+---+-----+-------------------+---+---+---+-----+----+-----+-----+-----+');
gotoxy(55, 14+i);
write('total sks = ',jmlsks);
gotoxy(55, 15+i);
write('total bobot = ',jmlbobot);
gotoxy(55, 16+i);
write('IP = ',ip:0:1);
gotoxy(55, 17+i); write('sks
yg diambil = ', ambil);
readln;
end;
--------------------------------------------------------------------------------------
begin
input;
hitung;
gotoxy(40, 20+i);
write('gunawanrudy90@yahoo.com');
readln;
end.
Silahkan Dimanfaatkan Sesukanya.... tapi jangan lupa komentnya... hehehe
good brow....
ReplyDelete