/* C program to draw Alphabets Upper Case */ #include<stdio.h> #include<graphics.h> void A() //For A { int x1=300; int y1=100; int x2=150; int y2=400; int x3=300; int y3=100; int x4=450; int y4=400; int x5=225; int y5=250; int x6=375; int y6=250; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void B()//For B { int x1=370; int y1=50; int x2=300; int y2=50; int x3=300; int y3=50; int x4=300; int y4=200; int x5=300; int y5=200; int x6=370; int y6=200; int x7=370; int y7=200; int x8=400; int y8=180; int x9=400; int y9=180; int x10=400; int y10=150; int x11=400; int y11=150; int x12=350; int y12=125; int x13=350; int y13=125; int x14=400; int y14=100; int x15=400; int y15=100; int x16=400; int y16=70; int x17=400; int y17=70; int x18=370; int y18=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); line(x11,y11,x12,y12); line(x13,y13,x14,y14); line(x15,y15,x16,y16); line(x17,y17,x18,y18); delay(2000); cleardevice(); } void C()//For C { int x1=380; int y1=100; int x2=400; int y2=100; int x3=400; int y3=100; int x4=400; int y4=50; int x5=400; int y5=50; int x6=300; int y6=50; int x7=300; int y7=50; int x8=300; int y8=200; int x9=300; int y9=200; int x10=400; int y10=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); delay(2000); cleardevice(); } void D()//For D { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=200; int x4=360; int y4=200; int x5=360; int y5=200; int x6=400; int y6=180; int x7=400; int y7=180; int x8=400; int y8=80; int x9=400; int y9=80; int x10=360; int y10=50; int x11=360; int y11=50; int x12=300; int y12=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); line(x11,y11,x12,y12); delay(2000); cleardevice(); } void E()//For E { int x1=300; int y1=200; int x2=300; int y2=50; int x3=300; int y3=200; int x4=400; int y4=200; int x5=300; int y5=125; int x6=350; int y6=125; int x7=300; int y7=50; int x8=400; int y8=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void F()//For F { int x1=300; int y1=200; int x2=300; int y2=50; int x3=300; int y3=50; int x4=400; int y4=50; int x5=300; int y5=125; int x6=350; int y6=125; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void G()//For G { int x1=400; int y1=50; int x2=300; int y2=50; int x3=300; int y3=50; int x4=300; int y4=200; int x5=300; int y5=200; int x6=350; int y6=200; int x7=350; int y7=200; int x8=350; int y8=125; int x9=350; int y9=125; int x10=400; int y10=125; int x11=400; int y11=125; int x12=400; int y12=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); line(x11,y11,x12,y12); delay(2000); cleardevice(); } void H()//For H { int x1=300; int y1=200; int x2=300; int y2=50; int x3=400; int y3=200; int x4=400; int y4=50; int x5=300; int y5=125; int x6=400; int y6=125; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void I()//For I { int x1=300; int y1=200; int x2=400; int y2=200; int x3=300; int y3=50; int x4=400; int y4=50; int x5=350; int y5=200; int x6=350; int y6=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void J()//For J { int x1=300; int y1=50; int x2=400; int y2=50; int x3=400; int y3=50; int x4=400; int y4=200; int x5=400; int y5=200; int x6=300; int y6=200; int x7=300; int y7=200; int x8=300; int y8=170; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void K()//For K { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=125; int x4=400; int y4=50; int x5=300; int y5=125; int x6=400; int y6=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void L()//For L { int x1=300; int y1=200; int x2=300; int y2=50; int x3=300; int y3=200; int x4=400; int y4=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); delay(2000); cleardevice(); } void M()//For M { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=50; int x4=400; int y4=100; int x5=400; int y5=100; int x6=500; int y6=50; int x7=500; int y7=50; int x8=500; int y8=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void N()//For N { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=50; int x4=400; int y4=200; int x5=400; int y5=200; int x6=400; int y6=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void O()//For O { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=200; int x4=400; int y4=200; int x5=400; int y5=200; int x6=400; int y6=50; int x7=400; int y7=50; int x8=300; int y8=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void P()//For P { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=50; int x4=400; int y4=50; int x5=400; int y5=50; int x6=400; int y6=125; int x7=400; int y7=125; int x8=300; int y8=125; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void Q()//For Q { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=200; int x4=400; int y4=200; int x5=400; int y5=200; int x6=400; int y6=50; int x7=400; int y7=50; int x8=300; int y8=50; int x9=380; int y9=180; int x10=430; int y10=230; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); delay(2000); cleardevice(); } void R()//For R { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=50; int x4=400; int y4=50; int x5=400; int y5=50; int x6=400; int y6=125; int x7=400; int y7=125; int x8=330; int y8=125; int x9=330; int y9=125; int x10=400; int y10=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); delay(2000); cleardevice(); } void S()//For S { int x1=400; int y1=50; int x2=300; int y2=50; int x3=300; int y3=50; int x4=300; int y4=125; int x5=300; int y5=125; int x6=400; int y6=125; int x7=400; int y7=125; int x8=400; int y8=200; int x9=400; int y9=200; int x10=300; int y10=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); line(x9,y9,x10,y10); delay(2000); cleardevice(); } void T()//For T { int x1=300; int y1=50; int x2=450; int y2=50; int x3=375; int y3=50; int x4=375; int y4=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); delay(2000); cleardevice(); } void U()//For U { int x1=300; int y1=50; int x2=300; int y2=200; int x3=300; int y3=200; int x4=400; int y4=200; int x5=400; int y5=200; int x6=400; int y6=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } void V()//For V { int x1=300; int y1=50; int x2=350; int y2=200; int x3=350; int y3=200; int x4=400; int y4=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); delay(2000); cleardevice(); } void W()//For W { int x1=300; int y1=50; int x2=350; int y2=200; int x3=350; int y3=200; int x4=450; int y4=125; int x5=450; int y5=125; int x6=550; int y6=200; int x7=550; int y7=200; int x8=600; int y8=50; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); line(x7,y7,x8,y8); delay(2000); cleardevice(); } void X()//For X { int x1=300; int y1=50; int x2=400; int y2=200; int x3=400; int y3=50; int x4=300; int y4=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); delay(2000); cleardevice(); } void Y()//For Y { int x1=400; int y1=50; int x2=300; int y2=200; int x3=300; int y3=50; int x4=350; int y4=125; line(x1,y1,x2,y2); line(x3,y3,x4,y4); delay(2000); cleardevice(); } void Z()//For Z { int x1=300; int y1=50; int x2=400; int y2=50; int x3=400; int y3=50; int x4=300; int y4=200; int x5=300; int y5=200; int x6=400; int y6=200; line(x1,y1,x2,y2); line(x3,y3,x4,y4); line(x5,y5,x6,y6); delay(2000); cleardevice(); } int main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); /* Windows Turbo-C users */ //initgraph(&gd,&gm,NULL); /* LINUX users */ A(); B(); C(); D(); E(); F(); G(); H(); I(); J(); K(); L(); M(); N(); O(); P(); Q(); R(); S(); T(); U(); V(); W(); X(); Y(); Z(); closegraph(); return 0; }
Search Here
C program to draw Upper Case Alphabets
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment