Using for loop we can find sum of digits of a number.
Inside the loop just perform
Logic Expression 1) rem=num%10. {To find the unit place no. using remainder functon}
2) sum = sum+rem {to find the addition ie output}
3) num=num/10 {to eliminate the added digit}
Just repeat these steps in the loop.
88,888
The possibilities are all the counting numbers from the largest 16-digit one to the largest 17-digit one.99,999,999,999,999,999 minus 9,999,999,999,999,999 = 90,000,000,000,000,000
3 digit numbers are lessthan 4 digit numbers
1
There is no such ratio that applies for all single-digit and double-digit integers.
Nope, look at 1000, this is a 4 digit number and we can't list it with 1,2,3, and 4
There are 99999 fractions with a 1-digit numerator and 5-digit denominator - 6 digits in all: though not all the fractions are different. Similarly there are 8,999,910 fractions with a 2-digit numerator and 4-digit denominator. And so on. In total, there are 3,600,009 fractions using 6 numbers.
Total possible 4-digit numbers= 1000, 1001,...,9999 = 9000 Total with same digit numbers = 1111,2222,...,9999 = 9 9000 - 9 = 8991
Total number of possible 3-digit numbers = 9!x10!10!
111 and 201
They are all single digit numbers.
874321 is the largest number made from all these digits.