var x1,x2,x3,s1,s2,s3:integer;
function SumOfNumber(num:integer):integer;
var s:string;
i:integer;
begin
s:=str(num);
for i:= 1 to length(s) do
SumOfNumber:= SumOfNumber+int(s[i]);
end;
BEGIN
read(x1,x2,x3);
s1:=SumOfNumber(x1);
s2:=SumOfNumber(x2);
s3:=SumOfNumber(x3);
if s1>s2 and s1>s3 then writeln(x1);
if s2>s1 and s2>s3 then writeln(x2);
if s3>s2 and s3>s1 then writeln(x3);
END.
в правильности написания функции приведения типов не уверенна.
var x1,x2,x3,s1,s2,s3:integer;
function SumOfNumber(num:integer):integer;
var s:string;
i:integer;
begin
s:=str(num);
for i:= 1 to length(s) do
SumOfNumber:= SumOfNumber+int(s[i]);
end;
BEGIN
read(x1,x2,x3);
s1:=SumOfNumber(x1);
s2:=SumOfNumber(x2);
s3:=SumOfNumber(x3);
if s1>s2 and s1>s3 then writeln(x1);
if s2>s1 and s2>s3 then writeln(x2);
if s3>s2 and s3>s1 then writeln(x3);
END.
в правильности написания функции приведения типов не уверенна.