brvn-bai3 22-23

15/12/2022

to hai2k9

Code
program bai3;
uses crt;
var n : string;
    tam,m,i : longint;
BEGIN
    clrscr;
    readln(n);
    m := 0;
    for i := 1 to length(n) do
      begin
        val(n[i], tam);
        m := m+tam;
      end;
    writeln(m);

END.