+ 2

How can i do a loop whit for?

24th Oct 2016, 12:42 PM
Angie Perez
Angie Perez - avatar
2 ответов
+ 1
If u want to print till 10 For( int a=1;a<=10;a++) // ( initialize , test expression , increment/decrement) // {Cout<<a;} // BODY of loop which is executed every time test is true //
24th Oct 2016, 2:13 PM
Jishnu
Jishnu - avatar
0
for (int i = 0; i<x; i++) { //add code here } this will loop x times
24th Oct 2016, 1:02 PM
defender