uses crt;
var
n, jml, rat, nilai: integer;
begin
clrscr;
n := 0;
jml := 0;
rat := 0;
write('Masukkan nilai Mahasiswa : '); readln(nilai);
while nilai <= 100 do
begin
jml := jml + nilai;
n := n + 1;
rat := jml div n;
write('Masukkan nilai Mahasiswa : '); readln(nilai);
end;
write('Rata - ratanya : ', jml, ' / ', n, ' : ', rat); readln;
end.
Tidak ada komentar:
Posting Komentar