#include<iostream.h>
#include<conio.h>
void main()
{
int x,y;
clrscr();
for(x=5;x<=15;x++) // parallel lines of z
{
gotoxy(x,5);
cout<<"+"<<endl;
gotoxy(x,15);
cout<<"+"<<endl;
}
x=5;
y=15;
while(x<=15) // / of Z
{
gotoxy(x,y);
cout<<"+"<<endl;
x++;y--;
if(y<=5)
break;
}
for(x=18;x<=25;x++) // 2 sides of O
{ gotoxy(x,15);
cout<<"+"<<endl;
gotoxy(x,5);
cout<<"+"<<endl;
}
for(y=5;y<=15;y++) // 2 sides of O
{
gotoxy(18,y);
cout<<"+"<<endl;
gotoxy(25,y);
cout<<"+"<<endl;
}
for(x=28;x<=32;x++) // Upper parallel part of R
{
gotoxy(x,5);
cout<<"+"<<endl;
gotoxy(x,10);
cout<<"+"<<endl;
}
for(y=5;y<=15;y++) // | of R
{
gotoxy(28,y);
cout<<"+"<<endl;
if(y>10)
continue;
}
for(y=5;y<=10;y++) // upper right part of R
{
gotoxy(32,y);
cout<<"+"<<endl;
}
y=10; //Lower line of R
x=28;
while(y<=15)
{
gotoxy(x,y);
cout<<"+"<<endl;
x++;
y++;
}
// _____________________________________________________________
for(x=35;x<=39;x++) // Upper parallel part of R
{
gotoxy(x,5);
cout<<"+"<<endl;
gotoxy(x,10);
cout<<"+"<<endl;
}
for(y=5;y<=15;y++) // | of R
{
gotoxy(35,y);
cout<<"+"<<endl;
if(y>10)
continue;
}
for(y=5;y<=10;y++) // upper right part of R
{
gotoxy(39,y);
cout<<"+"<<endl;
}
y=10; //Lower line of R
x=35;
while(y<=15)
{
gotoxy(x,y);
cout<<"+"<<endl;
x++;
y++;
}
// ____________________________________________________________________
for(x=43;x<=50;x++) // 2 sides of O ||
{ gotoxy(x,15);
cout<<"+";
gotoxy(x,5);
cout<<"+";
}
for(y=5;y<=15;y++) // 2 sides of O
{
gotoxy(43,y);
cout<<"+"<<endl;
gotoxy(50,y);
cout<<"+"<<endl;
}
getch();
}