Nested If Else In C plus plus In Hindi

Nested If Else In C++ In Hindi – Loops In C++ In Hindi

C++

Nested If Else In C++ In Hindi :- Nested If else Statement Ko Samajh Ne Ke Liye Ham Is Post Me C++ programming nested if else Ke Example Ko Dekhte Hai or Fir Iske Kuch Nested in c++ program in Hindi banate hai |

Nested If Else In C++ In Hindi

Contents

What is Nested If Else :- C++ Nested if else Condition Ke Under Ek or If Else Condition Jo Hoti Hai Usse Hi Ham Nested if else c++ Kahte Hai |

Read This Also : – Full Course C programming in Hindi

Syntax of Nested if else statement

Nested If Else Statement kese work karta hai ?

Nested If Else Statement kese work karta hai ?
if (condition) {
    //Nested if else inside the body of "if"

    if(condition2) {
       //Statements inside the body of nested "if"
    }

    else {
       //Statements inside the body of nested "else"
    }

}

else {
    //Statements inside the body of "else"
}

Aap Upper Dekh Sakte Hai C++ Nested If Else statement In Hindi Me Expression Ko Check Kar Rhe Hai or Uske Bad Us Statement ke Under Ek or Condition Check kar Rhe Hai And Uske Bad Ham Statement Ko print kar Rhe Hai |

Nested If Else Statement in cpp Flow Chart

Aap Niche Diye Gaye Flow Chart Image In Cpp Ko Dekh Sakte Hai Or Uske Hisab Se Aap Ye Understand Kar Sakte Hai Ki Nested Loop In C++ Kese Kaam Karti Hai |

Nested If Else Statement in c Flow Chart

Nested in C++ Flow Chart

Loops In C++ In Hindi

Nested Else If Statement in Hindi Ko Acchi Tarah Se Understand Karne Ke Liye Ham Ab Ek Kuch Program Banate Hai |

Example of nested if else cpp

#include <iostream>
#include <conio.h>
using namespace std;

int main()
{
   int var1, var2;
   cout<<"Input the value of var1:";
   cin>>&var1;
   cout"Input the value of var2:";
   cin>>&var2;
   if (var1 != var2)
   {
	cout<<"var1 is not equal to var2\n";

	//Nested if else
	if (var1 > var2)
	{
		cout<<"var1 is greater than var2\n";
	}
	else
	{
		cout<<"var2 is greater than var1\n";
	}

   }
   else
   {
	cout<<"var1 is equal to var2\n";
   }
   return 0;
}

Output :-

Input the value of var1: 12
Input the value of var2: 21
var1 is not equal to var2
var2 is greater than var1

Example 2:

Write A Program to find largest of Three number in C++ ?

#include<iostream>
using namespace std;

int main()
{
    int a,b,c;
    cout<<"Enter The Three Number :";
    cin>>a>>b>>c;

    if(a>b)
     {  
        if(a>c)
             {
                   cout<<"Greater Number "<<a;
              }
        else
              {
                   cout<<"Greater Number "<<c;
               }
       }
    else
     {
             if(b>c)
              {
                 cout<<"Greater Number "<<b;
              }
              else
               {
                  cout<<"Greater Number "<<c;
                }
      }

}
                           

Output :-

Enter The Three Number : 10 20 30
Greater Number 30

Nested if else example in CPP in Hindi

Also Read This Post

Dosto mujhe ummed hai ki aap Nested If Else In C++ In Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

2 thoughts on “Nested If Else In C++ In Hindi – Loops In C++ In Hindi

Leave a Reply

Your email address will not be published. Required fields are marked *