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

Emoticon
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Protected

Protected by Copyscape
 
Learn Programming © 2017. All Rights Reserved. Shared by WpCoderX
Top