Nesting While Loops : While « Language « C++
- C++
- Language
- While
Nesting While Loops
#include <iostream>
using namespace std;
int main(void)
{
int x = 0;
while (x++ < 5)
{
int y = 0;
while (y++ < 5)
cout << "X";
cout << '\n';
}
return 0;
}
Related examples in the same category