Hi there
I need help with the while loop, ive just started learning about it and I do not understand it. I heard that if the condition is true, the statements executes until
it becomes false.
It would be nice if someone could write me a small and simple example code
that shows me how the while loop works.
I was having trouble understanding the following:
I need help with the while loop, ive just started learning about it and I do not understand it. I heard that if the condition is true, the statements executes until
it becomes false.
It would be nice if someone could write me a small and simple example code
that shows me how the while loop works.
I was having trouble understanding the following:
Code:
#include <iostream>
using namespace std;
int main()
{
int length, width, num;
cin >> num;
while(num < 20) {
cout << "KKK ";
num++;
}
cin.get();
cin.get();
cin.get();
return 0;
}
Comment