Write a program to input a number and print whether the number is a
Glad number or not.
( A number is said to be a Glad number, if the sum of the even digits of the number
is divisible by the number of digits in the number)
Example : 40763
Sum of even digits = 4+0+6=10
Number of digits in the number = 5
Since 10 is divisible by 5, 40763 is a Glad number
Answers
Answered by
0
Answer:
what is computer sciences
anyone knows
thank for the answer
please mark as brainlist
Answered by
0
Answer:
hey mate here is your answer...
Explanation:
First some definitions are required. The digit sum of a number, say 152, is just the sum of the digits, 1+5+2=8. If the sum of the digits is greater than nine then the process is repeated. For example, the sum of the digits for 786 is 7+8+6=21 and the sum of the digits for 21 is 3 so the digit sum of 786 is 3.
Similar questions