or here is another ugly one
Code:
void create_box(int start_x,int start_y,int len_x,int len_y)
{
int x,y;
for (y=start_y;y<start_y+len_y+1;y++)
for (x=start_x;x<start_x+len_x+1;x++)
if ((y==start_y)||(y==start_y+len_y))
{
gotoxy(x,y);
cout << char(205);
}
else
{
gotoxy(start_x,y);
cout << char(186);
gotoxy(start_x+len_x,y);
cout << char(186);
}
gotoxy(start_x,start_y);
cout << char(201);
gotoxy(start_x+len_x,start_y);
cout << char(187);
gotoxy(start_x,start_y+len_y);
cout << char(200);
gotoxy(start_x+len_x,start_y+len_y);
cout << char(188);
}//end create_box()