I'm trying to solve the 3n+1 problem and I have a for loop that looks like this:
for(int i = low; i <= high; ++i)
{
res = runalg(i);
if (res > highestres)
{
highestres = res;
}
}
Unfortunately I'm getting this error when I try to compile with GCC:
3np1.c:15: error: âforâ loop initial declaration used outside C99 mode
I don't know what C99 mode is. Any ideas?