+ 6
How to make loop in c++?
7 Answers
+ 3
int a;
for(a=0; a<10;a++)
{
cout<<"hello";
}
+ 2
wow
+ 2
while[1]
{
//content
}
Try this its goes to infinity.
+ 2
//do while loop
int a;
do{
//statements
}while(condition);
/*This is another type of loop which is used when we want our program to be executed atleast once*/
+ 1
for( ; ; )
{
//this is a infinite loop
}
Try this also. It is a one type infinite loop but with for loop.
+ 1
If you try out the course for c++, you will learn about loops and everything else!
0
so where this infinite loop used?