Lecture 133
// Loop do while
//Print diagonal line in the screen
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int x,y;
y=1;
do
{
x=1;
do{
if(x==y)
cout<<"\xDB";
else
if(x==2*y)
cout<<"\xB1";
else
cout<<" ";
x++;
}while(x<24);
cout<<endl;
y++;
}while(y<24);
getch();
return 0;
}
Output: