Sum of Digits
Lesson 15 of 17 in Coddy's Functions in C course.
Challenge
EasyWrite a function that calculates the sum of digits in a number.
For example, if the input is 1234, the output is:10
Try it yourself
#include <stdio.h>
int sumOfDigits(int n) {
}