Wiki User
∙ 11y ago2230
Wiki User
∙ 11y ago3896
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); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
6,130 has.
80,557
4117
The number is 1193.
3896
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); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
6,130 has.
The smallest such number is 2499.
80,557
7252
4117
8499
It is 4692.
8613
Having: 9 ten-thousands → 90,000 the same number of thousands as ten thousands → 9 ten-thousands: 9 thousands → 9,000 8 fewer hundreds than ten-thousands → 9 ten-thousand: 9 - 8 = 1 hundreds → 100 6 more tens than hundreds → 1 hundreds: 1 + 6 = 7 tens → 70 6 fewer ones than thousands → 9 thousands: 9 - 6 = 3 ones → 3 → the number is 90,000 + 9,000 + 100 + 70 + 3 = 99,173.