Explain while loop with suitable example.
Answers
Answered by
1
The main characteristic of a while loop is that it will repeat a set of instructions based on a condition. As far as the loop returns a boolean value of TRUE, the code inside it will keep repeating. We use this kind of loop when we don't know the exact number of times a code needs to be executed. ... while (number <= 10) {
Similar questions