SS 01: CubeSum

Unfortunately I didn’t have much time for the first Software Sunday (being that it’s Mother’s Day) so it’s just a simple program for today.

Admittedly this is pretty much copied from a Java program I wrote a few months ago, but I found it quite interesting for its simplicity.

CubeSum finds the integers between 1 and 999 where the sum of each digit squared is equal to the number itself. It takes a second to get your head around, but it’s really quite simple in essence. Writing this was the first time I fully realised that complex maths problems can be solved with simple computer programs.

The code can be found HERE if anyone’s interested.

I’ll have a more interesting program next week, sorry :/