C Language

May 15, 2023

How to use while loop in C Language

Program to use while loop in C Language


#include <stdio.h>
int main()
{
    int i=1;
    while(i<10)
    {
        printf("%d ",i);
        i++;
    }
    return 0;
}

Output


123456789

by : Nadeem Khan

Quick Summary:

Program to use while loop in C Language copy #include <stdio.h> int main() { int i=1; while(i