Main.cc: In function ‘int main()’: Main.cc:10:16: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z if(j%n==0;){ ^ Main.cc:10:19: warning: statement has no effect [-Wunused-value] if(j%n==0;){ ~~~^~~ Main.cc:10:23: error: expected primary-expression before ‘)’ token if(j%n==0;){ ^