I assume when you wrote the post, you meant double the population if there is food, otherwise half the population.
Therefore you want to change the bracket slightly, by just simply changing the < to an >.
1 2 3 4 5 6 7 8
if(iFood > 0) //if food is greater than 0
{
iPopulation = iPopulation * 2; //then double population
}
else //otherwise
{
iPopulation = iPopulation/2; //half the population
}