News for hackers. Stuff that matters.
Re:Embarrassing code I wrote under stress at a job interview by AndyD1st on Saturday May 02, 2015 @08:53PM (#9479273)
Interesting article, but ironically the interviewee's solution is still incorrect at the end of his post. You'll notice that he only squares the first digit, and then adds the second digit rather than squaring it.

E.g. when he calls (happy 97) it prints 88. However, that's 9^2 + 7, when in fact the answer is 9^2 + 7^2 = 130.

There are no comments on this comment yet.