Assalamu alaikum wr,wb
salam sejahtera buat kita semua...
malam ini saya dapat tugas dari Temen nih,, mintol dibuatkan program DNS
mahasiswwa.. iseng iseng bongkar file semester 2 ehh ketemu...
heheheh... timggal permak sendri compile jadi dehh... heheh :D
gak usah panjang lebar, kubagi souce codenya dehh...
langsung saja yaahh..... cekidot >>>
PROGRAM DNS_NILAI;
USES CRT;
TYPE
IPS = RECORD
MK : STRING[20];
F : BYTE;
KD : STRING[7];
S : BYTE;
BBT : BYTE;
NH : CHAR;
END;
VAR PS : ARRAY[1..10] OF IPS;
I,J: BYTE;
A : STRING[20];
B : INTEGER;
C : STRING[20];
D : STRING[20];
E : REAL;
TTL : BYTE;
L,M : BYTE;
BEGIN
CLRSCR;
L:=9;
WRITE('MASUKKAN NAMA : ');READLN(A);
WRITE('MASUKKAN S T B : ');READLN(B);
WRITE('SEMESTER : ');READLN(C);
WRITE('JURUSAN : ');READLN(D);
WRITE('MASUKKAN JUMLAH MATA KULIAH : ');READLN(J);
WRITELN(':------:-------------:-----:-------:-------:-------------:');
WRITELN('| KODE | MATA KULIAH | SKS | NILAI | BOBOT | BOBOT * SKS |');
WRITELN(':------:-------------:-----:-------:-------:-------------:');
FOR I:= 1 TO J DO
BEGIN
GOTOXY(1,L);WRITE('| ');READLN(PS[I].KD);
GOTOXY(8,L);WRITE('| ');READLN(PS[I].MK);
GOTOXY(22,L);WRITE('| ');READLN(PS[I].S);
GOTOXY(28,L);WRITE('| ');READLN(PS[I].NH);
WRITELN(':------:-------------:-----:-------:-------:-------------:');
IF PS[I].NH = 'A' THEN
PS[I].BBT:=4
ELSE IF PS[I].NH = 'B' THEN
PS[I].BBT:=3
ELSE IF PS[I].NH = 'C' THEN
PS[I].BBT:=2
ELSE IF PS[I].NH ='D' THEN
PS[I].BBT:=1
ELSE
PS[I].BBT:=0;
GOTOXY(36,L);WRITE('| ',PS[I].BBT);
TTL:= PS[I].S*PS[I].BBT;
GOTOXY(44,L);WRITE('| ',TTL);
GOTOXY(58,L);WRITE('|');
M:=J*PS[I].S;
E:=TTL/PS[I].S;
L:=L+2;
END;
WRITELN; WRITELN;
WRITELN(':-------------------------:');
WRITE('| TOTAL S K S : ',M);WRITELN(' |');
WRITELN(':-------------------------:');
WRITE('| I P S : ',E:2:2);WRITELN(' |');
WRITELN(':-------------------------:');
READLN;
END.
from : dcc-dp.org
Minggu, 15 Desember 2013
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar