Lecture 123
// Loop do while
//Nested for loop
//fills square area on screen
#include <iostream>
#include <conio.h>
#include <windows.h>
HANDLE wHnd;
using namespace std;
main ()
{
system("CLS");//Clear screen
int row,col;
row=1;
do
{
col=1;
do
{
cout<<"\xdb";
col++;
}while(col<70);//inner loop
cout<<endl;
row++;
}while(row<22);//outer loop
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10