All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Four Digit Number II (Posted on 2003-07-06)
Pick a four digit number, all digits different, such that when you add its reverse and divide it by 10, you get the number you started with.

For example: 1749+9471=11220, 11220/10 = 1122. Since 1749 is not equal to 1122, this is not the right number.

 See The Solution Submitted by Gamer Rating: 3.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: Solution | Comment 2 of 12 |
(In reply to Solution by Lewis)

The uniqueness of that solution is verified by the following program. It also shows that there are no solutions even with digits allowed to be repeated.

```
FOR i = 1000 TO 9999

n\$ = LTRIM\$(STR\$(i))

n1\$ = RIGHT\$(n\$, 1) + MID\$(n\$, 3, 1) + MID\$(n\$, 2, 1) + LEFT\$(n\$, 1)

n = VAL(n1\$)

IF i * 10 = n + i THEN PRINT i

NEXT

```

 Posted by Charlie on 2003-07-06 06:07:14

 Search: Search body:
Forums (0)