sửa lỗi giúp mình bài này với, đề thi hk2 :< uses crt; program cau1; var toan ; van; tbc : array[20..30] of integer clrscr ; bagin for i:=20 to 30 write('nhap vao diem toan:') ; readln(toan[i]); write('nhap vao so diem van:') ; readln(van[i]) tbc[i] :=(van[i]+toan[i]i)/2; for i:=20 to 30 do ; writeln('diem trung binh la:',tbc[i]); readln end;
program cau1;
uses crt;
var toan , van, tbc : array[20..30] of real;
i:integer;
begin
clrscr ;
for i:=20 to 30
begin
write(‘nhap vao diem toan:’) ; readln(toan[i]);
write(‘nhap vao so diem van:’) ; readln(van[i]);
tbc[i] :=(van[i]+toan[i]i)/2;
end;
for i:=20 to 30 do
writeln(‘diem trung binh la:’,tbc[i]:0:2);
readln
end.
Bạn xem cái nào khác bạn sửa nhé
uses crt;
program cau1;
var toan, van, tbc : array[20..30] of real;
i: byte;
begin
clrscr ;
for i:=20 to 30 do
begin
write(‘nhap vao diem toan:’) ;
readln(toan[i]);
write(‘nhap vao so diem van:’) ;
readln(van[i]);
tbc[i] :=(van[i]+toan[i])/2;
end;
for i:=20 to 30 do
writeln(‘diem trung binh la:’,tbc[i]);
readln
end.