Use the while Statement to increase and output value - C Statement

C examples for Statement:while

Description

Use the while Statement to increase and output value

Demo Code

#include <stdio.h>

int main (void)
{
    int count = 1;

    while (count <= 5)
    {/*from w w  w.j  a  v a  2 s  .  c om*/
        printf ("%i\n", count);
        ++count;
    }

    return 0;
}

Result


Related Tutorials