Skip to content

Latest commit

 

History

History

021-sum-of-digits

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Sum of Digits

Challenge Description:

Given a positive integer, find the sum of its constituent digits.

Input sample:

The first argument will be a path to a filename containing positive integers, one per line. E.g.

23
496

Output sample:

Print to stdout, the sum of the numbers that make up the integer, one per line. E.g.

5
19