Program HOC24;
var i,d: integer;
a: array[1..6] of real;
begin
for i:=1 to 6 do
begin
write('Nhap diem cua ban thu ',i,': '); readln(a[i]);
end;
write('Diem trung binh tren 6.5 la: ');
for i:=1 to 6 do if a[i]>6.5 then write(a[i]:1:1,' ');
writeln;
d:=0;
for i:=1 to 6 do if a[i]<5 then d:=d+1;
write('Co ',d,' ban it hon 5 diem');
readln
end.
Đúng 1
Bình luận (0)
uses crt;
var a:array[1..6]of integer;
i,dem:integer;
begin
clrscr;
for i:=1 to 6 do
begin
write('Nhap diem cua ban thu ',i,' la: '); readln(a[i]);
end;
for i:=1 to 6 do
if a[i]>6.5 then write(a[i]:4);
writeln;
dem:=0;
for i:=1 to 6 do
if a[i]<5 then inc(dem);
writeln(dem);
readln;
end.
Đúng 1
Bình luận (0)