You're online now.

Hurray! you are online now.

Print numbers from 1 to 100 using while loop c and cpp program

// C program to print numbers from 1 to 100 using WHILE loop
    #include <stdio.h>
    
    int main()
    {
        
        int i = 1;
        while(i<=100){
            printf("%d ", i);
            i++;
        }
        return 0;
    }
    
// C++ Program to print number from 1 to 100 using while loop
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
       int i = 1;
       while(i<=100){
           cout<<i<<" ";
           i++;
       }
    
        return 0;
    }
🖤 0
Buy me coffee ☕

Comments

Oops!

No comments here...