program dz2;
var a,b,c,d,f,max:Integer;
begin
Writeln('введи число');
read(a);
b:= a div 1000;
c:= (a div 100) mod 10;
d:= (a div 10) mod 10;
f:= a mod 10;
max:=b;
if b<c then
max:=c;
if c<d then
max:=d;
if d<f then
max:=f;
Write(max);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program dz2;
var a,b,c,d,f,max:Integer;
begin
Writeln('введи число');
read(a);
b:= a div 1000;
c:= (a div 100) mod 10;
d:= (a div 10) mod 10;
f:= a mod 10;
max:=b;
if b<c then
max:=c;
if c<d then
max:=d;
if d<f then
max:=f;
Write(max);
end.