+ 2
How can i do a loop whit for?
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 //
0
for (int i = 0; i<x; i++) {
//add code here
}
this will loop x times