Program znanijacom;
uses crt;
var
n:string;
i,k,r,c,b:integer;
num:array [1..4] of char;
begin
writeln('vvedite celoe chislo <1000:');<br>read(n);
k:=length(n);
writeln('Cufr v chisle: ',k);
for i:=1 to k do
begin
num[i]:=n[i];
val(num[i],c,b);
r:=r+c;
end;
writeln('Ux cymma : ',r);
end.