Main.cc: In function 'int main()': Main.cc:9:6: error: 'n' was not declared in this scope if(n%i == 0 && a%i == 0){ ^