Program Index Kelulusan
Soal:
sebagai input adalah
- NIM (nim)
- NAMA MAHASISWA (namah)
- NILAI PEMPROGRAMAN (nilpem)
- KONVERSI TO IPK (ts)
sebagai output :
- IPK
- INDEX KELULUSAN dan KETERANGAN
Index kelulusan :
A : 100 >= X <= 85
B : 85 >= X <= 70
C : 70 >= X <= 55
D : 55 >= X <= 40
E : 39 >= X <= 0
Keterangan kelulusan :
selain index kelulusan E maka beri keterangan "LULUS". dan bagi index kelulusan E beri keterangan "TIDAK LULUS"
FLOWCHART
CODING PASCAL
program index_kelulusan;
uses crt;
var
namah,ket,ts : String[30];
mutu : char;
nim : longint;
nilpem, ipk : real;
begin
clrscr;
writeln('************************************************');
writeln('* SELAMAT DATANG DI UMC *');
writeLN('************************************************');
write(' NIM : ');
readln (nim);
writeln('================================================');
write(' NAMA : ');
readln (namah);
writeln('================================================');
write(' NILAI PEMPROGRAMAN : ');
readln (nilpem);
writeln('================================================');
write(' KONVERSI TO IPK? Y/N : ');
readln (ts);
writeln('================================================');
if (ts = 'y') or (ts = 'Y')then begin
ipk := (nilpem / 25);
end else if (ts = 'n') or (ts = 'N')then begin
ipk := (nilpem);
end;
if (nilpem >= 0) and (nilpem <=39) then begin
ket := ('TIDAK LULUS!');
mutu := ('E');
end else if (40 <= nilpem) and (nilpem <= 55) then begin
ket := ('LULUS');
mutu := ('D');
end else if (55 <= nilpem) and (nilpem <= 70) then begin
ket := ('LULUS');
mutu := ('C');
end else if (70 <= nilpem) and (nilpem <= 85) then begin
ket := ('LULUS');
mutu := ('B');
end else if (nilpem >= 85) and (nilpem <= 100 )then begin
ket := ('LULUS');
mutu := ('A');
end;
writeln;
writeln(' IPK = ', ipk:8:2 );
writeln(' ',mutu,' ' , ket);
writeln;
writeln('************************************************');
end.
BY. MAULANA MUCHLISH
DOSEN. WAHYU T, M.MPd
No comments:
Post a Comment