Division comes before multiplication
100
15 638 can be made with 1 ten, 5 ones, 6 hundreds, 3 tens, and 8 ones; 1 ten, 8 ones, 6 hundreds, 3 tens, and 5 ones; or 6 ones, 5 hundreds, 3 tens, 8 ones, and 1 ten.
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); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
600 + 50*10 + 0*1 = 600+500 = 1100
2 thousands: 2 × 1000 - 2,000 1 fewer hundreds than thousands: 2 - 1 = 1 hundred: 1 × 100 = 100 4 more tens than hundreds: 1 + 4 = 5 tens: 5 × 10 = 50 same number of ones as thousands: 2 ones: 2 × 1 = 2 → the number is 2000 + 100 + 50 + 2 = 2152.
3 tens 1 tens 5 ones
3 hundreds, 1 ten and 2 ones.
the second one .... first # = hundreds second # = tens third # = ones
The number has 1 thousand. It has 8 more hundreds than thousands so it has 8 more hundreds than 1. That is, it has 9 hundreds. It has 1 fewer tens than hundreds so it has 1 fewer tens than 9. That is, it has 8 tens.It has 2 fewer ones than tens so it has 2 fewer ones than 8. That is, it has 6 ones. So the number is 1986.
138
3 is in the ones place. 2 is in the tens place. 1 is in the hundreds place.
438
The number is 199.81