The number can be any one of these four numbers:
640
751
862
973
I am a four digit number. My tens digit is 2 more than my ones digit. My hundreds and thousands digit are both 1 less than my ones digit. What number can i be?
754 Piece of cake!
The answer is '28'.
Is it only 890 and 891
842
194
There are 40 possible answers. There can be any digit in the tens place. The digit in the hundreds place must be 6 more than the one in the units place.
There is no four digit number where the ones is twice the tens, the hundreds is five less than the ones, and the thousands is the sum of the tens and hundreds. int ones, tens, hundreds, thousands; for (thousands=1; thousands<10; thousands++) { /**/ for (hundreds=0; hundreds<10; hundreds++) { /**/ /**/ for (tens=0; tens<10; tens++) { /**/ /**/ /**/ for (ones=0; ones<10; ones++) { /**/ /**/ /**/ /**/ if (ones != 2 * tens) break; /**/ /**/ /**/ /**/ if (hundreds != ones - 5) break; /**/ /**/ /**/ /**/ if (thousands != tens + hundreds) break; /**/ /**/ /**/ /**/ printf ("dd\n", thousands, hundreds, tens, ones); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
Not necessarily.
22621, 44742, 66863, 88984
3221
22621, 44742, 66863, 88984