Contoh Program Pascal Perhitungan Ipk
uses wincrt;
var a,b,c : string;
x : integer;
d:char;
Grade : string;
begin
repeat
clrscr;
write('masukan nama siswa :');readln(a);
write('masukan angkatan :');readln(b);
write('masukan kelas :');readln(c);
write ('Inputkan Nilai Angka : '); readln(x);
case x of
0..44 : Grade :='E';
45..54 : Grade :='D';
55..69 : Grade :='C';
70..84 : Grade :='B';
85..100 : Grade :='A';
else
grade :='Tidak ada Nilai';
end;
writeln('==============...HASIL....=============');
writeln('Nama :',a);
writeln('angkatan :',b);
writeln('kelas :',c);
writeln ('IPK :',Grade);
writeln('======================================='); readln;
clrscr;
write('apakah anda ingin mengitung lagi?[y/t]');readln(d);
until upcase(d)<>'Y';
end.
Kurang Relevan? Coba Pencarian Lain!
uses wincrt;
var a,b,c : string;
x : integer;
d:char;
Grade : string;
begin
repeat
clrscr;
write('masukan nama siswa :');readln(a);
write('masukan angkatan :');readln(b);
write('masukan kelas :');readln(c);
write ('Inputkan Nilai Angka : '); readln(x);
case x of
0..44 : Grade :='E';
45..54 : Grade :='D';
55..69 : Grade :='C';
70..84 : Grade :='B';
85..100 : Grade :='A';
else
grade :='Tidak ada Nilai';
end;
writeln('==============...HASIL....=============');
writeln('Nama :',a);
writeln('angkatan :',b);
writeln('kelas :',c);
writeln ('IPK :',Grade);
writeln('======================================='); readln;
clrscr;
write('apakah anda ingin mengitung lagi?[y/t]');readln(d);
until upcase(d)<>'Y';
end.
1 komentar:
thank posting nya
Posting Komentar