Localize file
www.TrSek.com/zadania/prevod.pas
{ PREVOD.PAS Copyright (c) Pheo }
{ Program urèí ciferný súèet daného èísla. }
{ }
{ Datum:15.04.2003 http://www.trsek.com }
program prevod;
uses crt;
var X:string;
s,i,d:Integer;
begin
Writeln('Zadaj cislo X ako retazec: ');
Readln (X);
s:=0;
D:=length(X);
for i:=1 to d do s:=s+ord(x[i])-48;
writeln('Ciferny sucet je ', s);
readln;
end.
Copyrigth by Zdeno Sekerak 2007,
http://www.trsek.com