Please explain the while loop properly .
While loop in c++
while loop works same as the for loop
The only difference is that in while loop, we initialize before loop, check condition in while and increment after it inside the loop
eg.
int i=o, n=10;
while(i<n){
cout<<“Hello”;
i++;
}
The above code will print Hello 10 times.