0
int x= 0; while (x<= 10) { x+=2; cout<<x; } How many times will the cycle be performed?
4 odpowiedzi
0
6 times .
1st iteration. x=0
2nd iteration. x=2
3rd iteration. x=4
4th iteration. x=6
5th iteration. x=8
6th iteration. x=10
+ 2
It will be run 6 times . Try to dry run then j will understood how loop is working
+ 1
Miha You can check this on the playground easily..
What is difficulty you have with this... You should mention that..?
Do you don't the correct answers?
0
0246810