First of all debug your software!
Checking through iterations in the double loop:
for (int i=100; i < 1000; i++)
{
for (int j=100; j < 1000; j++)
{
num = i*j;
if (is_planidormic(num))
{
largest_plan = num;
}
}
}
You will see that the product 'num' restarts from low values each time a new inner loop restarts. So happen that on the last iteration you get a new palindrome that is smaller than the 'official' solution, 906609, because you put the palindrome in 'largest_plan' without checking.
Change your code to:
for (int i=100; i < 1000; i++)
{
for (int j=100; j < 1000; j++)
{
num = i*j;
if (is_planidormic(num))
{
if (num > largest_plan) {
largest_plan = num;
}
}
}
}
And you'll get the correct answer.
P.S.: I appreciated the downvote, but it would be much better to leave a note about it, so I, and others, could understand where is the wrong...