Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <graph.h>
void main()
{
char Daniel[2],Tr[2],Tl[2],Br[2],Bl[2],Vertical[2],Horizontal[2];
int Row,Col,k;
Daniel[0] = 178;
Daniel[1] = '\0';
Tr[0] = 191;
Tr[1] = '\0';
Tl[0] = 218;
Tl[1] = '\0';
Br[0] = 217;
Br[1] = '\0';
Bl[0] = 192;
Bl[1] = '\0';
Vertical[0] = 179;
Vertical[1] = '\0';
Horizontal[0] = 196;
Horizontal[1] = '\0';
system("cls");
_settextposition(1,34);
_settextcolor(11);
_outtext("First Column");
_settextcolor(15);
for ( Row = 0; Row < 48; Row++)
{
for ( Col = 0; Col < 10; Col++)
{
_settextposition( Row + 2, Col + 35);
_outtext(Daniel);
}
}
// row 2-8
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 3, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 8; Col++)
{
_settextposition( Row + 5, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 3, Col + 43 );
_outtext(Daniel);
}
}
// row 9 - 15
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 10, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 5; Col++)
{
_settextposition( Row + 14, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 12, Col + 43 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 10, Col + 43 );
_outtext(Daniel);
}
}
// Row 16-22
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 17, Col + 36 );
_outtext(Daniel);
}
}
k = 0;
while ( k < 4)
{
_settextcolor(0);
for ( Row = 0; Row < 2; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 17 +k, Col + 36 + k );
_outtext(Daniel);
}
}
k = k +1;
}
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 17, Col + 39 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 17, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 19, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 21, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 6; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 17, Col + 43 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 19, Col + 41 );
_outtext(Daniel);
}
}
// rows 23-29
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 24, Col + 36 );
_outtext(Daniel);
}
}
k = 0;
while ( k < 3 )
{
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 2; Col++)
{
_settextposition( Row + 26 -k, Col + 36 + 2 * k );
_outtext(Daniel);
}
}
k = k + 1;
}
k = 0;
while ( k < 3 )
{
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 2; Col++)
{
_settextposition( Row + 26 + k, Col + 36 + 2 * k );
_outtext(Daniel);
}
}
k = k + 1;
}
// rows 30 - 36
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 31, Col + 36 );
_outtext(Daniel);
}
}
k = 0;
while ( k < 3 )
{
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 33 + k, Col + 37 + k );
_outtext(Daniel);
}
}
k = k + 1;
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 4; Col++)
{
_settextposition( Row + 31, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 31, Col + 39 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 33, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 31, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 2; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row * 2 + 33, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 33, Col + 43 );
_outtext(Daniel);
}
}
// rows 37 - 43
k = 0;
while ( k < 3 )
{
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 2 ; Col++)
{
_settextposition( Row + 40 + k, Col + 36 + k );
_outtext(Daniel);
}
}
k = k + 1;
}
k = 0;
while ( k < 3 )
{
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 2 ; Col++)
{
_settextposition( Row + 40 - k, Col + 36 + k );
_outtext(Daniel);
}
}
k = k + 1;
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row * 2 + 38 , Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 38, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 3; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 40, Col + 43 );
_outtext(Daniel);
}
}
// rows 44-50
_settextcolor(0);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 45, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 4; Col++)
{
_settextposition( Row + 45, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 47, Col + 36 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 4; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 46, Col + 41 );
_outtext(Daniel);
}
}
_settextcolor(0);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 3; Col++)
{
_settextposition( Row + 47, Col + 41 );
_outtext(Daniel);
}
}
// borders first column
_settextcolor(14);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 2, Col + 45 );
_outtext(Tr);
}
}
_settextcolor(14);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 2, Col + 34 );
_outtext(Tl);
}
}
_settextcolor(14);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 8, Col + 45 );
_outtext(Br);
}
}
_settextcolor(14);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 8, Col + 34 );
_outtext(Bl);
}
}
_settextcolor(14);
for ( Row = 0; Row < 5; Row++)
{
for ( Col = 0; Col < 2; Col++)
{
_settextposition( Row + 3, Col * 11 + 34 );
_outtext(Vertical);
}
}
_settextcolor(14);
for ( Row = 0; Row < 2; Row++)
{
for ( Col = 0; Col < 8; Col++)
{
_settextposition( Row * 6 + 2, Col + 36 );
_outtext(Horizontal);
}
}
_settextcolor(15);
for ( Row = 0; Row < 49; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 2, Col +46 );
printf("%3d",Row+2);
}
}
_settextcolor(15);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 53, Col+35);
printf("%1d", Col + 35);
}
}
_settextcolor(15);
for ( Row = 0; Row < 1; Row++)
{
for ( Col = 0; Col < 1; Col++)
{
_settextposition( Row + 54, Col + 44);
printf("%1d", Col + 44);
}
}
}