function abc(s:string):integer; var i:integer; begin Result:=0; for i:=1 to Length(s) do Result:=Result+StrToInt(s[i]); end;