0% found this document useful (0 votes)
18 views1 page

Rata Rata

Pascal rata-rata

Uploaded by

Indra Wira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Rata Rata

Pascal rata-rata

Uploaded by

Indra Wira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Program rat2;

uses crt;
var
a: array [1..5] of integer;
i,total : integer;
rata : real;
begin
clrscr;
total:=0;
for i:= 1 to 5 do
begin
write('Masukkan Nilai Mata kuliah ke-',i,' :');
readln(a[i]);
end;
writeln('');
writeln('NILAI DAN PERINGKAT ANDA');
writeln('========================');
for i := 1 to 5 do
begin
writeln(a[i]);
end;
for i:= 1 to 5 do
begin
total:= total +a[i];
end;
rata:=total/5;
writeln;
writeln('Total
=',total);
writeln('Rata - rata =',rata:5:2);
writeln('');
begin
if (a[i] >= 60) and (total > 340) then
writeln('Anda Lulus Dengan Grade A')
else
if (a[i] >= 60) and (total > 280) then
writeln('Anda Lulus Dengan Grade B')
else
if (a[i] >= 60) and (total > 240) then
writeln('Anda Lulus Dengan Grade C')
else
if (a[i] >= 60) and (total <= 240) then
writeln('Anda Lulus Dengan Grade D')
else
writeln('Anda Tidak lulus')
end;
readln;
end.

You might also like