Sum of Digits

A collection of 1 post

Sum of Digits

Problem Write a program that, when N natural numbers are input, finds the sum of the digits of each natural number, and outputs the natural number with the largest sum. If the sum of digits is the same, the answer is the number with the larger original number. If 235 and 1234 can be the answer at…