Main.cc: In function 'int main()': Main.cc:7:9: error: 'i' was not declared in this scope for(i=1;<=n;i++) ^ Main.cc:7:13: error: expected primary-expression before '<=' token for(i=1;<=n;i++) ^