There exist no numbers which are less than the sum of their digits.
This is obvious for single digit numbers, since each number would be exactly equal to the sum of its digits.
For multi-digit numbers, this still holds true. Let's take a two digit number in the form: ab. Where a and b represent the digits of this number.
The sum of the digits of ab = a + b.
The number ab = a*10 + b.
It should now be obvious that ab will always be greater than a + b.
For larger numbers, the difference between the sum of digits and the number only grows, as a number abc = a*100 + b*10 + c, abcd = a*1000 + b*100 + c*10 + d, etc.
Proof by exhaustion (via Java code, since this is listed in the programming category):
for (int n = 10; n <= 99; ++n) {
int _n = n;
int sumDigits = 0;
while (_n != 0) {
sumDigits += _n % 10;
_n /= 10;
}
if (n < sumDigits) {
// This code is never reached, since n >= sumDigits for all 10 <= n <= 99
System.out.println(n + " < " + sumDigits);
}
}
86let number=ab;sum of digits=a+b=14 -- eq(1)and give first digit is 4 less than twice of 2nd.soa+4=2b --eq(2)solve 1 and 2 u can get,a=8 and b=6so number is 86Also, using Chagorian's Degharvium, you can find out howab2 is equal to N1 plus Y4 divided by a3 plus b4.If you know what Chagorian's Degharvium is, you can do it fast and easily.
5
Add the last digit plus the sum of all the previous digits. The base case is that if your integer only has a single digit, just return the value of this digit. You can extract the last digit by taking the remainder of a division by 10 (number % 10), and the remaining digits by doing an integer division by 10.
It appears that only single digit numbers work (0 thru 9)
# includevoid main(){int no,rem=0,sum=0,n; /*declaration*/printf("Enter 2 digit number:");scanf("%d",&no);for(n=1;n
A) If a number has two digits, then the sum of its digits is less than the value of the original two-digit number.
91 since the ones digit is 8 less than 9 and the two digits, 9+1 = 10, a two-digit number.
74
27
46
12
153....
96
I am a 3 digit number divisible by 7 but not 2 the sum of my digits is 4 what number am I
It is 58.
150
The number is 782. The sum of its digits is 7 + 8 + 2 = 17, not 26. Therefore, no such number exists that meets all the given conditions.