Main.cc: In function 'int main()': Main.cc:13:2: error: expected ';' before 'for' for (int j=2;i<=10;i++) ^ Main.cc:13:15: error: 'i' was not declared in this scope for (int j=2;i<=10;i++) ^