C++ if statement with Multiple else if Blocks

Description

C++ if statement with Multiple else if Blocks

#include <iostream> 
  
using namespace std; 
  
int main(int argc, const char * argv[]) 
{ 
        if (false) 
        { //from w ww .  ja  va  2  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; 
}



PreviousNext

Related