// Use of semicolon in "if" #include using namespace std; int main() { int a=2; int b=4; //OK if (a < b) cout << "yes"; else cout << "no"; //NEEDS A SEMICOLON BEFORE else if (a < b) cout << "yes" else cout << "no"; //OK if (a < b) { cout << "yes"; } else cout << "no"; //; AFTER THE FIRST BRACE CAUSES ERROR if (a < b) { cout << "yes"; }; else cout << "no"; system("pause"); return 0; }