Hi, I've started the euler.net problems and am currently working on problem 4, which states "Find the largest palindrome made from the product of two 3-digit numbers" I've created what look to be a successful function for both turning doubles into strings, and then comparing elements of those strings in order to discover whether the string is a palindrome.
However, the output simply isn't correct. Curious to figure out what the real answer was i looked it up and sure enough my program wasn't even close. When i plug in the correct answer into my 2 functions (but leaving it out of my nested for-loops) It indeed knows that it's a palindrome and outputs it correctly, which leads me to believe that the problem needs to be with the loops. If you guys could provide some input into why this is it would be greatly appreciated, feel free to criticize any part of my code, even things unrelated to my question.
Line 24 doesn't do what you think it does. Look carefully.
Also, mind your blocks and your indentation. The if on line 21 encompasses the one on line 24.
Alright, I got ride of that if statement since it was unnecessary. But my program is still outputting a palindrome that is far lower then the actual answer! Anyone have any ideas on that?