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