+ 6

How to make loop in c++?

22nd Jan 2018, 4:20 AM
Marie Claire B. Mendoza
Marie Claire B. Mendoza - avatar
7 Answers
+ 3
int a; for(a=0; a<10;a++) { cout<<"hello"; }
22nd Jan 2018, 4:27 AM
šŸ¦‹FEATHERšŸ¦‹
šŸ¦‹FEATHERšŸ¦‹ - avatar
+ 2
wow
22nd Jan 2018, 4:29 AM
Marie Claire B. Mendoza
Marie Claire B. Mendoza - avatar
+ 2
while[1] { //content } Try this its goes to infinity.
22nd Jan 2018, 6:03 AM
Ayush Tripathi
+ 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*/
22nd Jan 2018, 8:05 AM
Mohd Zaki
Mohd Zaki - avatar
+ 1
for( ; ; ) { //this is a infinite loop } Try this also. It is a one type infinite loop but with for loop.
22nd Jan 2018, 4:01 PM
Abhinav Sindhu
Abhinav Sindhu - avatar
+ 1
If you try out the course for c++, you will learn about loops and everything else!
24th Jan 2018, 11:12 PM
Purpll
Purpll - avatar
0
so where this infinite loop used?
24th Jan 2018, 7:26 AM
Sanjay Nandha
Sanjay Nandha - avatar