// 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;
}
Comments
Oops!