The keyword if tells the compiler that what follows is a alarm ascendancy instruction. The action afterward the keyword if is consistently amid aural a brace of parentheses. If the condition, whatever it is, is true, again the account is executed. If the action is not accurate again the account is not executed.

Various conditional operators used for if statement are as follows:


  • Greater than(>)
  • Less than(<)
  • Equal to(= =)
  • Greater than equla to(>=)
  • Less than equal to(<=)
  • Not equal to(!=)


Here are some expressions which are true if:
x = = y
x is equal to y
x != y
x is not equal to y
x < y
x is less than y
x > y
x is greater than y
x <= y
x is less than or equal to y
x >= y
x is greater than or equal to y


0 comments to "IF STATEMENT"

Post a Comment

Powered by Blogger.