The number 28 is a perfectly reasonable number. The sum of the digits of several numbers is 10.
19 for instance
The sum of the digits of the number 10 is calculated by adding its individual digits together. The digits in 10 are 1 and 0. Therefore, the sum is 1 + 0 = 1.
10 9+9+1 = 19 1+9=10
64
64
28
28
19.
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