The sum of digits

Report a typo

There is a three-digit integer (an integer from 100 to 999). Find the sum of its digits.

Don't forget that you can get digits in a number with /10 and %10.

Sample Input 1:

476

Sample Output 1:

17
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic