Character Generation

#include<stdio.h>
#include<conio.h>
#include<graphics.h>

void main()
{
    int gd=DETECT,gm,top,bottom,right,left,xmax,ymax;
    int i,j;
    int a[4][26]={{1,0,0,1,0,1,1,1,0,1,1,1,0,1,0,1,0,1,1,1,0,1,1,1,0,0},
                  {1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,1,0,0},
                  {1,0,1,1,0,1,1,1,0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0},
                  {1,0,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,0,1,0,0,1,1,1,0,0}};
    initgraph(&gd,&gm,"C:\\TC\\BGI");
    for(i=0;i<4;i++)
    {
        for(j=0;j<26;j++)
        {
            putpixel(260+j*3,200+i*3,a[i][j]*7);
        }
    }
    getch();
}

Output:Char_gen

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s