The "while" loop in C++:
Today we learn the "while" loop in c++. I've already shown you how the "for" loop works and the "while" loop is just as good once you get used to it. I break it down a little and explain how it fully works. I've heard from some that the while loop is actually easier but I'll let you judge for yourself.
I hope you enjoy the video and if you have any requests feel free to let me know.
#include <iostream>
using namespace std;
int main()
{
int count, i;
count = 0;
i = 5;
while(i<10){
count = count + i;
i++;
cout << "Count is " << count << '.' << endl;
}
system("pause");
}