0

Consider the following programme code and tell how many times the loop will execute.

var x=6,y=36; while(x<=y) { y=y/x; x=x+6; }

17th Feb 2017, 6:50 AM
Abhinav
2 Réponses
+ 2
just 1 time, y = 6 and x = 12 after execute that 1 time
17th Feb 2017, 7:09 AM
Kawaii
Kawaii - avatar
0
Only once. After the first iteration y will be 6 and x will be 12, so the while condition would be false.
17th Feb 2017, 7:08 AM
Petar Dimitrov
Petar Dimitrov - avatar