foo.cc: In function ‘int main()’:
foo.cc:7:16: error: ‘x1’ was not declared in this scope; did you mean ‘x’?
    7 |         cin>>x,x1;
      |                ^~
      |                x
foo.cc:10:21: error: ‘i’ was not declared in this scope
   10 |                 for(i=2; i<=x1-1; i++)
      |                     ^
foo.cc:13:33: error: ‘n’ was not declared in this scope
   13 |                                 n+=1;
      |                                 ^
foo.cc:15:21: error: ‘i’ was not declared in this scope
   15 |                 for(i=2; i<=x-x1-1; i++)
      |                     ^
foo.cc:18:33: error: ‘n’ was not declared in this scope
   18 |                                 n+=1;
      |                                 ^
foo.cc:20:20: error: ‘n’ was not declared in this scope
   20 |                 if(n==0)
      |                    ^
foo.cc:22:17: error: ‘n’ was not declared in this scope
   22 |                 n=0;
      |                 ^