Câu 4:
program ct;
uses crt;
var A:array[1..10] of integer;
i,max:integer;
begin clrscr;
for i:=1 to 10 do
begin
write('Nhap phan tu thu ',i,': '); readln(A[i]);
end;
max:=A[1];
for i:=1 to 10 do
if max>A[i] then max:=A[i];
writeln('So lon nhat trong day so la: ',max);
readln;
end.
Câu 5:
program ct;
uses crt;
var DT:array[1..20] of real;
i:integer;
begin clrscr;
for i:=1 to 20 do
begin
write('Nhap phan tu thu ',i,': '); readln(DT[i]);
end;
writeln('Diem toan cua 20 hoc sinh la: ');
for i:=1 to n do
write(DT[i]:3);
readln;
end.
Học tốt!