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.
Wiro Sableng #110 : Rahasia Patung Menangis
7 tahun yang lalu
0 komentar:
Posting Komentar