Main.cc: In function ‘int main()’: Main.cc:16:21: error: ‘j’ was not declared in this scope if(x>0&&x>=a[j]){ ^