Follow Us

if statements in programming Execution



Simple if statement

If the test condition is true,the statement block will be executed,otherwise the statement block may be skipped

Syntax:

If(cond)
{
statement block;
}

If-else Statement:

If the test condition is true ,then true block will be executed,otherwise the false block will be executed

Syntax:

If(cond)
{
true block statement;
else
{
false statement;
}
Share:

Recent Posts