Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lol;
- var
- a,b:integer;
- begin
- readln(a);
- b:=0;
- while abs(a) > 0 do
- begin;
- b:=b+ (a mod 10);
- a:= a div 10;
- end;
- writeln(abs(b));
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement