logo
logo
Sign in

C Programming while and do...while Loop

avatar
Tech Mekrz
C Programming while and do...while Loop

The syntax of a while loop is:

where, testExpression checks the condition is true or false before each loop.

If the test expression is true (nonzero), codes inside the body of while loop are exectued.

The process goes on until the test expression is false.

// Program to find factorial of a number

// For a positive integer n, factorial = 1*2*3...n

collect
0
avatar
Tech Mekrz
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more