CODINGCLASSES|LEARNTOPROGRAM
WHILE LOOP IN C++
E.G:-
#include<iostream.h>
#include<conio.h>
void main()
{
int i=0 ,n;
cout<<"Enter the number from own wish"<<endl;
cin>>n;
while(i<=n)
{
cout<<"This programm is the example of while loop "<<endl;
i++;
cout<<"i"<<endl;
}
getch();
}
o/p:-
Enter the number of own wish n=10
0,1,2,3,4,5,6,7,8,9
Hii, friends in this program no any compile and runtime error it is already checked in Turbo c/c++ ide.
IF you have any query plz comment below
thanks for visiting!!
WHILE LOOP IN C++
E.G:-
#include<iostream.h>
#include<conio.h>
void main()
{
int i=0 ,n;
cout<<"Enter the number from own wish"<<endl;
cin>>n;
while(i<=n)
{
cout<<"This programm is the example of while loop "<<endl;
i++;
cout<<"i"<<endl;
}
getch();
}
o/p:-
Enter the number of own wish n=10
0,1,2,3,4,5,6,7,8,9
Hii, friends in this program no any compile and runtime error it is already checked in Turbo c/c++ ide.
IF you have any query plz comment below
thanks for visiting!!
No comments:
Post a Comment