LIVE CHANNELS
Select You Favorite MOVIES in Category
Browse » Home » » The while loop

The while loop

The while loop

The general format for a while loop is
while (condition) {
        simple or compound statement (body of the loop);
    }
#include<stdio.h>

main(){
   
    int i = 0;
    while (i<5){
        printf(" the value of i is %d\n", i);
        i = i + 1;
    }
}
Related Videos