Fog Creek Software
Discussion Board




c language

disscus about the for loop,If condtion,If else conditions,while loop

krishnaprasath
Tuesday, May 17, 2005

I think for loops suck. The ifs are beautiful and i would gladly do while.

Reinvent the square wheel.
Tuesday, May 17, 2005

The For loop is used when you wont to perform a task a set number of times.

The While loop is used when the number of times for an operation is not specified so the loop will be performed until a give condition is met, then exit the loop.

The If condition will only be preformed if the statment within the conditional is true.

The If Else conditions are used to perform the task within the If statement if the conditional is true and perform the task in the Else statement if the conditional is false.

Kristian M. Pownall
Friday, June 03, 2005

*  Recent Topics

*  Fog Creek Home