i have to write an application to find the smallest palindromic numbers made from the product of three 3-digit positive integers that have even and odd numbers of digits? how would i do this?
I used this code as a template but i dont understand how to modify it:
This code shouldn't work. test == buf will never be true as they are constant pointers to different arrays. xor (^=) thing is not needed at all either. All you want to do is check that buf[z] ==buf[len-z-1] for all z from 0 to len/2.
Anyway, what you need to do is write a function bool is_palindrome(int i); and then put it in three nested "for i = 100 to 999" loops.