if statement with || and && : If : Statement C# Examples


C# Examples » Statement » If »

 

if statement with || and &&









    
using  System;

class  MainClass
{
    static  void  Main(string[]  args)
    {
        int  a  =  5,  b  =  5,  c  =  10;

        if  (a  ==  b)
            Console.WriteLine(a);

        if  ((a  >  c)  ||  (a  ==  b))
            Console.WriteLine(b);

        if  ((a  >=  c)  &&  (b  <=  c))
            Console.WriteLine(c);
    }
}
    
   
  
   



Output

5
5


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Statement
» If