Main.cc: In function 'int main()': Main.cc:14:17: error: expected ';' before 'if' if( x+y+z==n && 5*x+3*y+z/3==n && z%3==0){ ^