test

Go to the online java ide at ideone.com

Paste this into the body of the main() method

int a,b,c,d;
for(a=0; a < 10; a++) for(b=0; b < 10; b++) for(c=0; c < 10; c++) for(d=0; d < 10; d++)
if(d * (100 * a + 10 * b + c) == 1000 * b + 100 * a + 10 * d + c)
System.out.println("Solution: a = " + a + " b = " + b + " c = " + c + " d = " + d);

System.out.println("Done");

You will find there are four solutions:

Solution: a = 0 b = 0 c = 0 d = 0
Solution: a = 2 b = 1 c = 0 d = 6
Solution: a = 5 b = 1 c = 0 d = 3
Solution: a = 8 b = 6 c = 0 d = 8

None of them match the conditions of the question, that the digits are from 1-9.

Posted By: Old Man on January 10th 2016 at 14:09:03


Message Thread


Reply to Message

In order to add a post to the WotB Message Board you must be a registered WotB user.

If you are not yet registered then please visit the registration page. You should ensure that their browser is setup to accept cookies.

Log in