我正在尝试解决3n + 1问题,我有一个for看起来像这样的循环:
for(int i = low; i <= high; ++i)
{
res = runalg(i);
if (res > highestres)
{
highestres = res;
}
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,当我尝试使用GCC编译时,我收到此错误:
3np1.c:15:错误:'for'循环初始声明在C99模式之外使用
我不知道C99模式是什么.有任何想法吗?