Computer Science, asked by hemasriminnu, 4 months ago

J0229
Niven numbers
09:41
Problem statement
Niven numbers are positive integers greater than 0 that are divisible by the sum of their digts. For example, 42 's a live unters
divisible by 4 + 2 = 6. You are given a function,
int ChecklivenNumber(int n);
2
The function accepts an integer 'n' as its argument. Implement the function to check if 'n' is tiven. If 'nNiven, then return the number
times it is divisible by the sum of its digits (i.e. the quotient), else return O. Assume that 'n'>0.
Example:
Input:
36
Output:
4
Explanation: The output is 4 since 3+6 = 9 and 36/9 = 4.
Sample Input
57
Sample Output​

Answers

Answered by applanaidusadi
0

Answer:

4+2+5+6+4+4+3+8+51+98+53=338

Similar questions