Yups... seperti permintaan temen-temen, udh saya buatin neh codenya...
Copy Paste aja... gratis kok!!!
Program KHS_Frezz;
uses winDos, wincrt;
Const
CompanyName='STMIK BUMIGORA';
days:array[0..6] of string[9] =
('Minggu', 'Senin','Selasa','Rabu','Kamis','Jumat','Sabtu');
Var
Id_String:array[0..20,0..5]of string[20];
Id_Real:array[0..20,0..5]of real;
Ip, KnT, nilai, bobot, kn:real;
DW, TA, Code, NamaMK, Nama, NIM:String[30];
SMS, BMtk, SKS, Skst, i, j :Integer;
grade:String[2];
y, m, d, dow :word;
procedure
PadString(S: String; PadLen: Integer);
begin
Write(S, ' ':PadLen - Length(S));
end;
begin
Writeln('INPUT FORM');
Writeln;
Write('Masukan Nama : ');Readln(Nama);
Write('Masukan Nim : ');Readln(Nim);
Write('Smester : ');Readln(SMS);
Write('Tahun Ajaran : ');Readln(TA);
Write('Dosen Wali : ');Readln(DW);
Write('Berapa Mata Kuliah Yang Diambil : ');Readln(BMtk);
Writeln;
For i:=1 to BMtk do begin
Writeln('Mata Kuliah ',i,' :');
Write(' - Kode Mata Kuliah : '); Readln(Code);
Write(' - Nama Mata Kuliah : '); Readln(NamaMK);
Write(' - SKS : '); Readln(SKS);
Write(' - Nilai : '); Readln(Nilai);
If (Nilai>= 90) Then
grade:= 'A'
Else If Nilai>=80 Then
grade:= 'B+'
Else If Nilai>=70 Then
grade:= 'B'
Else If Nilai>=60 Then
grade:= 'C+'
Else If Nilai>=50 then
grade:= 'C'
Else If Nilai>=40 then
grade:= 'D'
Else grade:= 'E';
If (grade= 'A') Then
Bobot:= 4
Else If grade= 'B+' Then
Bobot:= 3.5
Else If grade='B' Then
Bobot:= 3
Else If grade='C+' Then
Bobot:= 2.5
Else If grade>='C' then
Bobot:= 2
Else If grade>='D' then
Bobot:= 1
Else Bobot:= 0;
KN:=bobot*SKs;
Id_string[i,1]:=Code;
Id_string[i,2]:=NamaMK;
Id_Real[i,1]:=Sks;
Id_Real[i,2]:=Bobot;
Id_string[i,3]:=Grade;
Id_Real[i,3]:=Kn;
KnT:=KnT+kn;
SksT:=SksT+Sks
end;
Ip:=KnT/SksT;
ClrScr;
Writeln(' ':45 - Length(CompanyName), CompanyName);
Writeln(' ':23,'****KARTU HASIL STUDI(KHS)****');
Writeln;
Writeln;
write(' Nim : '); PadString(Nim,27);
write('Smester : ',Sms);
Writeln;
write(' Nama : ');PadString(nama,27);
write('Tahun Ajaran : ',TA);
Writeln;
write(' Dosen Wali : ');PadString(DW,27);
write('PROGRAM S1 TEKHNIK INFORMATIKA');
Writeln;
Writeln;
Writeln(' ---------------------------------------------------------------------------- ');
PadString('| Kode', 15);
PadString('Mata Kuliah', 30);
PadString('SKS', 9);
PadString('NM', 9);
PadString('HM', 8);
write('KN |');
Writeln;
Writeln(' ---------------------------------------------------------------------------- ');
i:=0;
For i:= 1 to BMtk do
begin
write ('| '); PadString(Id_String[i,1], 13);
PadString(Id_String[i,2], 30);
write(Id_Real[i,1]:0:0); PadString(' ', 8);
write(Id_Real[i,2]:0:1); PadString(' ', 6);
PadString(Id_String[i,3], 8);
write(Id_Real[i,3]:0:1); PadString(' ', 3);PadString('|', 0);
Writeln;
end;
Writeln(' ---------------------------------------------------------------------------- ');
Writeln;
Writeln('Ip Anda : ',Ip:0:2);
Writeln;
Writeln;
getDate(y,m,d,dow);
writeln('Mataram ',', ', days[dow],' ', M:0, '-', d:0, '-', y:0);
Writeln;
Writeln;
Writeln;
Writeln('Frezz!!!');
end.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment