Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  жжж
Language: PASCAL
Code:
uses crt;
var s: string;
    i: byte;
    sum,c,k: integer;
begin
sum:=0;
write('s='); readln(s);
for i:=1 to length(s) do
    if s[i] in ['0'..'9'] then
       begin
       val(s[i],c,k);
       sum:=sum+c;
       end;
writeln('Сумма цифр=',sum);
readln;
end.          
Comments: