program menghitungnilaigrade;
var
nilai:integer;
grade:string;
begin
writeln('menghitung nilai dan nilai grade');
writeln('--------------------------------');
write('masukan nilai');readln(nilai);
if (nilai>100) then
grade:='salah'
else if (nilai>80) then
grade:='A'
else if (nilai>70) then
grade:='B'
else if (nilai>50) then
grade:='C'
else if (nilai>30) then
grade:='D'
else if (nilai>0) then
grade:='E'
else if (nilai<0) then
grade:='salah';
writeln('maka nilai anda adalah',grade);
end.
var
nilai:integer;
grade:string;
begin
writeln('menghitung nilai dan nilai grade');
writeln('--------------------------------');
write('masukan nilai');readln(nilai);
if (nilai>100) then
grade:='salah'
else if (nilai>80) then
grade:='A'
else if (nilai>70) then
grade:='B'
else if (nilai>50) then
grade:='C'
else if (nilai>30) then
grade:='D'
else if (nilai>0) then
grade:='E'
else if (nilai<0) then
grade:='salah';
writeln('maka nilai anda adalah',grade);
end.
0 comments:
Posting Komentar