The if statement has the same function as other languages. It has three basic forms:
if (expression)
statement
...or:
if (expression)
statement1
else
statement2
...or:
if (expression)
statement1
else if (expression)
statement2
else
statement3
For example:
int x,y,w;
main()
{
if(x<0)
{
z=w;
......
}
else
{
z=y;
.........
}
}