Var n,d:integer; f:Text; begin Assign(f,'input.txt'); Reset(f); Read(f,n); Assign(f,'output.txt'); Rewrite(f); d:=n mod 10; while n>=10 do n:=n div 10; if n>d then Writeln(f,'>') else if n=d then Writeln(f,'=') else Writeln(f,'<'); Close(f) end. TXT
Var a,b:longint; function sum (n:integer):integer; var s:integer; begin s:=0; while (n<>0) do begin s:=s+n mod 10; n:=n div 10; end; sum:=s; end; begin write ('A = '); readln (a); write ('B = '); readln (b); if sum(a) > sum(b) then writeln ('Сумма цифр 1ого числа больше на ',sum(a)-sum(b)) else if sum(b) > sum (a) then writeln ('Cумма цифр 2ого числа больше на ',sum(b)-sum(a)) else writeln ('Сумма цифр 1ого числа равна сумме цифр 2ого числа'); readln; end.
Var a,b:longint; function sum (n:integer):integer; var s:integer; begin s:=0; while (n<>0) do begin s:=s+n mod 10; n:=n div 10; end; sum:=s; end; begin write ('A = '); readln (a); write ('B = '); readln (b); if sum(a) > sum(b) then writeln ('Сумма цифр 1ого числа больше на ',sum(a)-sum(b)) else if sum(b) > sum (a) then writeln ('Cумма цифр 2ого числа больше на ',sum(b)-sum(a)) else writeln ('Сумма цифр 1ого числа равна сумме цифр 2ого числа'); readln; end.
n,d:integer;
f:Text;
begin
Assign(f,'input.txt'); Reset(f);
Read(f,n);
Assign(f,'output.txt'); Rewrite(f);
d:=n mod 10;
while n>=10 do n:=n div 10;
if n>d then Writeln(f,'>')
else
if n=d then Writeln(f,'=') else Writeln(f,'<');
Close(f)
end.
TXT