The number 28 is a perfectly reasonable number. The sum of the digits of several numbers is 10.
19 for instance
10 9+9+1 = 19 1+9=10
64
64
28
19.
28
By the sum of its digits: 10. By each of its individual digits: 11.
28
enter the number whose digits are to be added num is the given value num=0! k=num%10 sum=sum=k k=num/10 num=k print the sum of the digits
class Sum_Of_Digits { public static void printSumandnoofdigits(int n) { int temp = n; int count = 0; int sum = 0; while ( n > 0 ) { sum = sum + n % 10; n = n / 10; count ++; } System.out.println("The number is..." + temp ); System.out.println("The sum of digits is..." + sum); System.out.println("The number of digits is..." + count); } }
517
The sum of the squares of the digits of 13 is 12 + 32 = 10. The sum of the squares of the digits of this result is 12 + 02 = 1. Because this process results in a 1, this number is a happy number.