Search Here

C program to draw Lower Case Alphabets



/* C program to draw a - z */

#include<graphics.h>
int main()
{
    int gd = DETECT,gm;
   
    //initgraph(&gd, &gm, "C:\\TC\\BGI"); /* For Windows Turbo-C users */
    initgraph(&gd,&gm,NULL); /* For Linux users */
    setbkcolor(WHITE);
    setcolor(BLACK);
    
    /* Block to draw a */
    ellipse(265,95,180,375,80,50);
    ellipse(267,230,30,320,80,60);
    ellipse(350,190,90,250,20,90);
    delay(5000); cleardevice();
    
    /* Block to draw b */
    line(200,70,200,370);
    ellipse(200,295,270,90,90,75);
    delay(10000); cleardevice();
    
    /* Block to draw c */
    ellipse(320,240,90,270,90,100);
    circle(320,148,8);
    delay(10000); cleardevice();
    
    /* Block to draw d */
    line(200,70,200,370);
    ellipse(200,295,90,270,90,75);
    delay(10000); cleardevice();
    
    /* Block to draw e */
    ellipse(320,240,180,0,90,100);
    line(230,240,410,240);
    ellipse(320,240,40,270,90,100);
    delay(10000); cleardevice();
    
    /* Block to draw f */
    arc(270,100,180,20,70);
    line(200,100,200,350);
    line(180,120,220,120);
    delay(10000); cleardevice();
    
    /* Block to draw g */
    line(200,70,200,350);
    ellipse(200,145,90,270,90,75);
    arc(150,350,0,180,50);
    line(100,350,200,220);
    delay(10000); cleardevice();
    
    /* Block to draw h */
    line(200,70,200,350);
    arc(260,250,180,0,60);
    line(320,250,320,350);
    delay(10000); cleardevice();
    
    /* Block to draw i */
    circle(320,80,10);
    line(320,100,320,320);
    delay(10000); cleardevice();
    
    /* Block to draw j */
    circle(320,80,10);
    line(320,100,320,320);
    arc(290,320,0,180,30);
    delay(10000); cleardevice();
    
    /* Block to draw k */
    line(200,30,200,380);
    line(200,235,340,90);
    line(200,235,340,380);
    delay(10000); cleardevice();
    
    /* Block to draw l */
    line(200,70,200,350);
    delay(10000); cleardevice();
    
    /* Block to draw m */
    arc(180,150,200,20,20);
    line(200,150,200,280);
    arc(250,150,180,0,50);
    line(300,150,300,280);
    arc(350,150,180,0,50);
    line(400,150,400,280);
    delay(10000); cleardevice();
    
    /* Block to draw n */
    arc(180,150,200,20,20);
    line(200,150,200,280);
    arc(250,150,180,0,50);
    line(300,150,300,280);
    delay(10000); cleardevice();
    
    /* Block to draw o */
    circle(200,200,100);
    delay(10000); cleardevice();
    
    /* Block to draw p */
    line(200,70,200,370);
    ellipse(200,145,270,90,90,75);
    delay(10000); cleardevice();
    
    /* Block to draw q */
    line(200,70,200,370);
    ellipse(200,145,90,270,90,75);
    delay(10000); cleardevice();
    
    /* Block to draw r */
    line(200,120,200,280);
    arc(250,155,180,0,50);
    circle(295,155,5);
    delay(10000); cleardevice();
    
    /* Block to draw s */
    ellipse(200,145,90,270,90,75);
    ellipse(200,295,270,90,90,75);
    delay(10000); cleardevice();
    
    /* Block to draw t */
    line(290,70,290,350);
    line(230,120,350,120);
    line(290,350,350,300);
    delay(10000); cleardevice();
    
    /* Block to draw u */
    ellipse(320,100,360,180,100,250);
    delay(10000); cleardevice();
    
    /* Block to draw v */
    line(200,70,290,380);
    line(380,70,290,380);
    delay(10000); cleardevice();
    
    /* Block to draw w */
    line(140,110,200,330);
    line(270,160,200,330);
    line(270,160,330,330);
    line(390,110,330,330);
    delay(10000); cleardevice();
    
    /* Block to draw x */
    line(200,70,380,380);
    line(380,70,200,380);
    delay(10000); cleardevice();
    
    /* Block to draw y */
    line(170,100,285,230);
    line(400,100,180,350);
    delay(10000); cleardevice();
    
    /* Block to draw z */
    line(200,70,380,70);
    line(200,380,380,380);
    line(260,220,330,220);
    line(380,70,200,380);
    delay(1000); cleardevice();
    
    closegraph();
    system("clear");
    return 0;
}


C program to draw all Lower Case Alphabets
Output
C program to draw all Lower Case Alphabets
Output

No comments:

Post a Comment