Задача 1:
program z1;
var a,b,c,sum : integer;
begin
read (a);
b:=a mod 10;
c:= a mod 100;
c:= c div 10;
a:=a div 100;
sum:= a+b+c;
writeln (sum);
end.
Задача 2:
program z2;
var a: integer;
begin
read (a);
a:=a mod 100;
a:= a div 10;
writeln (a);
end.