15.c++ program to display numbers from 1 to 10 using while loop
// C++ program to display numbers from 1 to 10 using while loop
INPUT:
#include<iostream>
using namespace std;
int main()
{
int i=1;
while(i<=10)
{
cout<<i<<"\n";
i++;
}
}
OUTPUT:
// C++ program to display numbers from 1 to 10 using while loop
INPUT:
#include<iostream>
using namespace std;
int main()
{
int i=1;
while(i<=10)
{
cout<<i<<"\n";
i++;
}
}
OUTPUT:
Comments
Post a Comment