0
What is the output?
int num = 1; while (num<6){ num=num+1 } count << num; //Output 6 Can anyone explain this how it's come??
2 Respuestas
+ 4
Malem Yengkhom when the loop runs for num=5 , condition of while is satisfied and then inside while loop num is again incremented by 1.
->Now value of num is 6
->now the condition of while is false so loop breaks
->now when you display the value of num then it would be 6
0
Thanks buddy for information ❣️