Main.cc: In function ‘int main()’:
Main.cc:18:39: error: expected primary-expression at end of input
cout << (n % 2 == 0 ? 1 : -1) <<
^~
Main.cc:18:39: error: expected ‘}’ at end of input
Main.cc:18:39: error: expected ‘}’ at end of input