uses crt;
var
n, max, nilai, jml: integer;
begin
clrscr;
n := 0;
max := 0;
jml := 0;
repeat
begin
n := n + 1;
write('Masukkan nilai Mahasiswa ke-', n, ' : '); readln(nilai);
if nilai = max then
begin
jml := jml + 1;
end;
if nilai > max then
begin
max := nilai;
end;
end;
until n = 7;
write('Nilai Tertinggi : ', max, ' '); writeln;
write('Banyak Nilai Tertinggi : ', jml, ' '); readln;
end.
Tidak ada komentar:
Posting Komentar