Next: The ? operator Up: Conditionals Previous: Conditionals

The if statement

The if statement has the same function as other languages. It has three basic forms:

if (expression)

...or:

if (expression)

else

...or:

if (expression)

else if (expression)

else

For example:

int x,y,w;

main()


drago@scri.fsu.edu
Jan. 1997