Hello everyone. Just some short, but interesting C++ (using Dev-C++) challenges that will get you thinking.

"Write an algorithm to find and print out all 4 digit numbers__abcd__, which match the equation (a+b+c+d)^4=__abcd__.

The same letters mark the same digits."

Good luck and have fun :)

"Write an algorithm to find and print out all 4 digit numbers

The same letters mark the same digits."

Good luck and have fun :)

Last edited on

are there any rules to the numbers, ie. can they be the same? for example (0+0+0+0)^4=0x0x0x0

I don't see how it's an C++ (or rather programming) challenge. Solving this with pen and paper actually faster than writing code for it.

This is really a beginners, and also if the numbers were bigger, it would be extremely difficult to solve it by hand. It's a short code btw

It reminds me of ProjectEuler challenges, which requires use of unortodox thinking, bruteforcing it with aid of computer or combining both and comparing your programm lenght to others on forums.

Topic archived. No new replies allowed.