Pages

Wednesday, 21 February 2018

Nested If Statement in C++ Programming Language Tutorials

Nested If Statement in C++ Programming Language Tutorials
#include <iostream>
using namespace std;
int main(){
   int num=90;
   /* Nested if statement. An if statement
    * inside another if body
    */
   if( num < 100 ){
      cout<<"number is less than 100"<<endl;
      if(num > 50){
         cout<<"number is greater than 50";
      }
   }
   return 0;

}