how to get an if statement in an if statement C++ code example Example: if c++ int x = 20; int y = 18; if (x > y) { cout << "x is greater than y"; }