C++ examples for Statement:if
Multiple else if Blocks
#include <iostream> using namespace std; int main(int argc, const char * argv[]) { if (false) { /*from ww w. ja va2 s .com*/ cout << "Print This When True!"; } else if (false) { cout << "Print This When First Else If Is True!"; } else if (true) { cout << "Print This When Second Else If Is True!"; } else { cout << "Print This If All False!"; } return 0; }