A counting while loop with upper limit - C Statement

C examples for Statement:while

Description

A counting while loop with upper limit

Demo Code

#include <stdio.h>
int main(void)
{
    const int NUMBER = 22;
    int count = 1;                     
    /*from www  . j a  v a 2  s . com*/
    while (count <= NUMBER) {
        printf("Be my Valentine!\n");  
        count++;
    }

    return 0;
}

Result


Related Tutorials