Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 437 Bytes

File metadata and controls

26 lines (19 loc) · 437 Bytes

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