Want this question answered?
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); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
The general function is:1. y = a*x+bb is irrelevant and we can be removed2. y = a*xlets split x into ones and tens3. x = tens*10 + ones /e.g. 23 = 2*10 + 34. p1 = Multiplier of the onesp2 = Multiplier of the tens5. y = tens*10*p2 + ones*p1 /according to the question6. x*a = tens*10*p2 + ones*p1 /according to 2.7. (tens*10 + ones)*a = tens*10*p2 + ones*p1 /according to 3.8. tens*10*a + ones*a = tens*10*p2 + ones*p1 /regroup9. tens*10*a - tens*10*p2 + ones*a - ones*p1 = 0 /regroup10. tens*10*(a-p2) + ones*(a-p1) = 0 /regroup11. assuming "tens" and "ones" are not 0 then (a-p2) and (a-p1) must be 012. a-p2 = 0a-p1 = 013. a = p2a = p114. a = p1 = p2the answer is: when the Multipliers of ones and tens are equal then the product is called a.
100 = (9x10) + (10x1) = 90 + 10
31
3
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); /**/ /**/ /**/ } /**/ /**/ } /**/ } }
16
The general function is:1. y = a*x+bb is irrelevant and we can be removed2. y = a*xlets split x into ones and tens3. x = tens*10 + ones /e.g. 23 = 2*10 + 34. p1 = Multiplier of the onesp2 = Multiplier of the tens5. y = tens*10*p2 + ones*p1 /according to the question6. x*a = tens*10*p2 + ones*p1 /according to 2.7. (tens*10 + ones)*a = tens*10*p2 + ones*p1 /according to 3.8. tens*10*a + ones*a = tens*10*p2 + ones*p1 /regroup9. tens*10*a - tens*10*p2 + ones*a - ones*p1 = 0 /regroup10. tens*10*(a-p2) + ones*(a-p1) = 0 /regroup11. assuming "tens" and "ones" are not 0 then (a-p2) and (a-p1) must be 012. a-p2 = 0a-p1 = 013. a = p2a = p114. a = p1 = p2the answer is: when the Multipliers of ones and tens are equal then the product is called a.
One hundred.
Nine tens = 90 Ten ones = 10 90 + 10 = 100
100 = (9x10) + (10x1) = 90 + 10
9 tens + 12 ones = 9 × 10 + 12 × 1 = 90 + 12 = 102.
3
7 tens and 20 ones is 7 × 10 + 20 × 1 = 70 + 20 = 90 (ninety).
The product of 10 tens is 100
9 tens = 90. 4 fewer ones than tens = 9 - 4 = 5. Therefore the answer is 95.
31