What is  Else IF Statement?

Else if statement:-
                     The "else if "statement in C is generally used when need to compare more then one condition.

Example:-

                if(num>20)
               {
 
                    result=2*num;

                 }
          else if(num>10)
             {

      result=3*num;

               }
          else
        {
 
       result=3*num;
           }

Post a Comment

Protected

Protected by Copyscape
 
Learn Programming © 2017. All Rights Reserved. Shared by S.A.R
Top