What is IF Statement?

Ans:
        IF Statement:-
                                 If statement gives the user the choice of execuated tp true or skipping it is the expression is evaluated to false.

Syntax:-

        If(expression)
     {


      Statement;

      }
The  statement is executed  if and only if the expression is true.

Example:

                 If (num>20)
                {

                 result=2*num;

                    }
The content of num is multilay by 2 if and only if the value of num is greater then 20.

________________________________________________________________________________


               If you face any problem so contact me Thank you 

               Contact :- https://www.facebook.com/Teach.Coding


Post a Comment

Protected

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