0

int x= 0; while (x<= 10) { x+=2; cout<<x; } How many times will the cycle be performed?

10th May 2020, 10:29 AM
Mihaela Trencheska
4 Réponses
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
10th May 2020, 11:22 AM
Mukul
Mukul - avatar
+ 2
It will be run 6 times . Try to dry run then j will understood how loop is working
11th May 2020, 10:33 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 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?
10th May 2020, 11:15 AM
Jayakrishna 🇮🇳
0
0246810
10th May 2020, 5:30 PM
Naveed
Naveed - avatar