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.
________________________________________________________________________________
Post a Comment