C++ Programming Code Examples C++ > For Loops and While Loops Code Examples While Loop program in C++ While Loop program in C++ #include <iostream> using namespace std; int main(){ int i=1; /* The loop would continue to print the value of i until the given condition i<=6 returns false. */ while(i<=6){ cout<<"Value of variable i is: "<<i<<endl; i++; } }