Berikut adalah Program Grade Nilai Pascal menggunakan statemen Case Of
program grade_nilai;
uses wincrt;
var
x : integer;
Grade : string;
begin
clrscr;
write ('nilai anda = '); readln(x);
case x of
85..100: Grade :='A';
75..84 : Grade :='B';
65..74 : Grade :='C';
55..64 : Grade :='D';
0..54 : Grade :='E';
else
grade :='Tidak ada Nilai';
end;
writeln ('Grade = ',Grade);
readln;
end.
Hasilnya :
Nilai Anda = 80
Grade = B
program grade_nilai;
uses wincrt;
var
x : integer;
Grade : string;
begin
clrscr;
write ('nilai anda = '); readln(x);
case x of
85..100: Grade :='A';
75..84 : Grade :='B';
65..74 : Grade :='C';
55..64 : Grade :='D';
0..54 : Grade :='E';
else
grade :='Tidak ada Nilai';
end;
writeln ('Grade = ',Grade);
readln;
end.
Hasilnya :
Nilai Anda = 80
Grade = B
waw .. nyimak aja sob ,, bingung banget masalah pascal :)
ReplyDelete@Bayu Aldi Yansyah: haha iya sob ..1 koment dr anda sangat beraty bgi sya..hehe
ReplyDeletethu program yg ane pelajari wktu kul...
ini untuk laporan akhir lab saya, makasih udah bantu
ReplyDeletehttps://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
XL4LPİ