![](https://rs.olm.vn/images/avt/0.png?1311)
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var st:array[1..100]of string;
a,b,c:array[1..100]of real;
i,n:integer;
max:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(st[i],a[i],b[i],c[i]);
max=(a[1]+b[1]+c[1])/3;
for i:=1 to n do
if (max<(a[i]+b[i]+c[i])/3) then max:=(a[i]+b[i]+c[i])/3;
writeln(max:4:2);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
program TimDiemCaoNhat;
var
diem: array[1..30] of integer;
i, diemCaoNhat, soThuTu: integer;
begin
for i := 1 to 30 do
begin
write('Nhap diem cua ban thu ', i, ': ');
readln(diem[i]);
end;
diemCaoNhat := diem[1];
soThuTu := 1;
for i := 2 to 30 do
begin
if diem[i] > diemCaoNhat then
begin
diemCaoNhat := diem[i];
soThuTu := i;
end;
end;
writeln('Diem cao nhat la: ', diemCaoNhat);
writeln('Ban thu ', soThuTu, ' dat diem cao nhat.');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var s:string;
i,d,dem:integer;
begin
clrscr;
write('Nhap chuoi S:'); readln(s);
d:=length(s);
writeln('Trong chuoi ',s,' co ',d,' ki tu');
writeln('Chuoi dao cua chuoi ',s,' la: ');
for i:=d downto 1 do
write(s[i]:4);
writeln;
dem:=0;
for i:=1 to d do
if s[i] in ['0'..'9'] then inc(dem);
writeln('So chu so trong xau la: ',dem);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Program HOC24;
const fi='BAI2.INP';
fo='BAI2.OUT';
var f: text;
i,j,n,dem,t1,t2: longint;
function kt1(x,y: longint): boolean;
var s1,s2,s3,s4: string;
d,j: longint;
begin
kt1:=false;
str(x,s1);
str(y,s2);
d:=0; s3:=''; s4:='';
for j:=length(s2) downto 1 do s3:=s3+s2[j];
for j:= length(s1) downto 1 do s4:=s4+s1[j];
for j:=1 to length(s1) do
if s4[j]=s3[j] then d:=d+1;
if (d=length(s1)) and (x*x=y) then kt1:=true else kt1:=false;
end;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,n);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
dem:=0;
for i:=1 to n do
for j:=1 to n do
if kt1(i,j) then dem:=dem+1;
writeln(f,dem);
for i:=1 to n do
for j:=1 to n do
if kt1(i,j) then
writeln(f,'(',i,';',j,')');
close(f);
end;
begin
ip;
out;
end.