Main.cc: In function 'int main()':
Main.cc:18:4: error: 'x' was not declared in this scope
x = i;
^
Main.cc:21:10: error: 'x' was not declared in this scope
cout << x;
^
Main.cc:7:10: warning: unused variable 'n' [-Wunused-variable]
int max,n;
^