Write a function that returns the sum of all digits in a given integer.
MediumProblem Statement
Write a function that returns the sum of all digits in a given integer.
Sample Input
num = 1234
Sample Output
10
Limits
Time: 2s · Memory: 256 MB
Write a function that returns the sum of all digits in a given integer.
num = 1234
10
Time: 2s · Memory: 256 MB