Skip to main content

Posts

Showing posts with the label Codes

C program to wish happy new year 2023 | wish new year using programming language

  How programmer wish happy new year by programming knowledge ?  C program to wish happy new year  Hello friends Happy New Year to all of you. And on this occasion of New Year, we have prepared a simple mini project using C programming language.                              Whose code you can download it by clicking on the download link given below.  Download link

C program to wish happy new year 2023 | wish new year using programming language

  How programmer wish happy new year by programming knowledge ?  C program to wish happy new year  Hello friends Happy New Year to all of you. And on this occasion of New Year, we have prepared a simple mini project using C programming language.                              Whose code you can download it by clicking on the download link given below.  Download link

Draw Doraemon picture using C graphic - ( code studio )

 Draw Doraemon picture using C graphic How to draw Doraemon picture? Today we are telling you how we can draw a photo of Doraemon using c ++ graphics. You can see its code below and you can use it by copying it. We have also made a video on this. You can also watch it below link. LINK Code -  #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); ellipse(200,450,150,390,50,16); line(157,441,243,441); ellipse(252,448,246,389,50,18); line(243,441,297,441); ellipse(249,441,90,180,10,15); ellipse(155,410,80,280,8,8); line(157,441,157,370); line(297,441,297,350); circle(147,357,16);              //hand ellipse(137,342,300,330,58,19); ellipse(174,348,110,170,29,49); circle(327,275,16); ellipse(265,260,299,340,74,90); ellipse(323,285,110,170,25,19); //head line(163,302,285,302); line(163,298,285,298);

Draw Red Fort using C graphic

  Draw Red Fort using C graphic In this program, we have drawn a red fort using this graphic. On this topic, we have uploaded a video on YouTube, you can go and see our channel code studio there.  #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void main() {  int gd=DETECT,gm;  initgraph(&gd,&gm,"c:\\tc\\bgi");  line(30,450,600,450);  line(0,440,30,450);  line(650,436,600,450);  line(30,430,600,430);  line(0,420,30,430);  line(650,416,600,430);  line(30,410,600,410);  line(0,400,30,410);  line(650,400,600,410);  line(30,410,30,450);  line(600,410,600,450);  line(593,410,593,450);  line(37,410,37,450);  rectangle(40,215,590,370);  rectangle(200,215,410,370);  line(200,221,410,221);  line(200,227,410,227);  rectangle(210,250,400,260);  rectangle(213,260,397,370);  rectangle(235,270,290,367);  rectangle(310,270,370,367);  line(40,260,200,260);  line(40,265,200,265);  line(92,265,92,370);  line(1

Wishing Happy Birthday using C graphic - ( code studio ) l c++ graphic

  //using c++ Graphic Wish Happy Birthday Today we will know the code of how to wish birthday by using C plus plus graphy. In this program, using some functions, we have divided the program into some parts, this will make us easier to understand. Code is given below you can copy it. Before running the program, write your name where it is mentioned in the code and then run the code. Download source code  Draw Airoplane using C graphic Draw train using C graphic Wish happy new year using C graphic Draw human face using C graphics Draw rocket using C graphic

Draw and move Airoplane ( Code studio ) - c++ graphic

  Draw and move Airoplane #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); for(int i=0;i<550;i++) { rectangle(150+i,100,170+i,130); ellipse(150+i,115,90,270,127,15); ellipse(116+i,104,10,170,24,12); line(120+i,120,70+i,166); line(90+i,120,60+i,160); ellipse(77+i,160,180,250,16,8); line(120+i,93,89+i,62); line(96+i,101,76+i,62); line(76+i,63,89+i,63); line(30+i,80,50+i,110); line(10+i,85,30+i,120); line(10+i,85,30+i,80); rectangle(170+i,110,175+i,120);        if(i%2==0)        { ellipse(178+i,94,0,360,3,18);        }        else        { ellipse(178+i,136,0,360,3,18);        }        delay(30);        cleardevice(); } getch(); closegraph(); }

Draw and move train using c++ graphic ( Code studio)

Using C++ graphic draw train  #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void train(); void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); train(); getch(); closegraph(); } void train() {      for(int i=0;i<250;i++)      { //background outtextxy(450,60,"'"); outtextxy(480,50,"'"); outtextxy(410,199,"'"); outtextxy(450,290,"'"); outtextxy(440,190,"'"); outtextxy(400,260,"'"); outtextxy(580,250,"'"); outtextxy(410,199,"'"); outtextxy(550,340,"'"); outtextxy(640,190,"'"); outtextxy(200,40,"'"); outtextxy(230,10,"'"); outtextxy(550,99,"'"); outtextxy(100,50,"'"); outtextxy(400,100,"'"); setfillstyle(SOLID_FILL,15); circle(

Draw Fish Tank (c++ graphic)- code studio

Draw Fish Tank using c++ graphic #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void tank(); void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); tank(); getch(); closegraph(); } void tank() {    for(int i=0;i<240;i++)    {    //tank     setcolor(15);     rectangle(130,160,470,340);     setfillstyle(SOLID_FILL,5);     rectangle(100,130,500,160);     floodfill(101,140,15);    //right stone    setfillstyle(SOLID_FILL,7);    ellipse(452,332,0,360,14,7);    floodfill(452,332,15);    setfillstyle(SOLID_FILL,8);    ellipse(422,332,0,360,14,7);    floodfill(422,332,15);    setfillstyle(SOLID_FILL,8);    ellipse(394,332,0,360,14,7);    floodfill(394,332,15);    setfillstyle(SOLID_FILL,7);    ellipse(372,322,0,360,10,17);    floodfill(372,322,15);    setfillstyle(SOLID_FILL,8);    ellipse(352,324,0,360,10,14);    floodfill(352,324,15);    setfillstyle(SOLID_FILL,7);    elli

Wish happy new year with code ( code studio )

  //Wishing Happy New year with code #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void y_2020(); void next(); void main() { int gd=DETECT,gm;   initgraph(&gd,&gm,"c:\\tc\\bgi");        y_2020();        next(); getch(); closegraph(); } void y_2020() { for(int r=0;r<500;r++) { circle(20,300,10); setcolor(6); settextstyle(10,0,4); outtextxy(10,290,"2"); setcolor(15); line(20,350,18,400);  // left line(20,350,22,400);//right line(0,400,700,400); line(10,320,0,350); line(33,320,40,350); circle(70,300,10); settextstyle(10,0,4); outtextxy(57,290,"0"); line(70,350,68,400);  // left line(70,350,72,400);//right line(0,400,700,400); line(57,320,47,350); line(82,320,90,350); circle(120,300,10); settextstyle(10,0,4); setcolor(BLUE); outtextxy(110,290,"2"); setcolor(15); line(120,350,118,400);  // left

Fireworks

 Graphics program to Display Animation (Fireworks) #include<conio.h> #include<graphics.h> #include<stdio.h> #include<math.h> void main() { int gd,gm; int x,y; int i,j,kk; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c:\\tc\\bgi"); setcolor(WHITE); line(0,400,640,400); rectangle(300,330,340,400); rectangle(310,320,330,330); setcolor(4); line(319,280,319,398); line(320,280,320,398); rectangle(320,280,330,300); outtextxy(340,280,"PRESS ANY KEY TO IGNITE THE ROCKET"); getch(); for(j=400;j<640;j++) { cleardevice(); setcolor(WHITE); line(0,j,640,j); rectangle(300,j-70,340,j); rectangle(310,j-80,330,j-70); setcolor(RED); line(319,280,319,400); line(320,280,320,400); rectangle(320,280,330,300); setcolor(YELLOW); circle(325,300,2); delay(5); } for(i=400;i>340;i--) { cleardevice(); setcolor(RED); line(319,i,319,i-120); line(320,i,320,i-120); rectangle(320,i-120,330,i-100); setcolor(YELLOW); circle(325,i-100,2); delay(25); } cleardevic

Draw human face using C++ graphics - (code studio )

 // Use C++ Graphic Draw Human Face #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi");        dline(170,100,174,170);        line(170,100,220,80);        line(220,80,290,78);        line(290,78,329,89);        line(329,89,339,110);        line(174,170,193,160);        line(212,107,212,86);        line(212,107,214,140);        line(280,109,280,81);        ellipse(336,179,90,160,150,70);        line(193,158,240,152);        ellipse(327,170,38,160,90,60);        ellipse(307,148,30,120,70,30);        line(368,134,399,134);        ellipse(320,281,403,60,40,180);        ellipse(319,236,397,50,45,100);        ellipse(349,242,360,60,10,80); ellipse(338,244,289,10,20,50);      //  ellipse(298,248,270,16,60,20);        ellipse(335,191,290,320,10,160);        ellipse(292,282,296,7,60,20);        ellipse(179,200,50,170,17,30);        el

Boy and girl romantic scene code ( code studio) - c++ graphic

 Boy and girl romantic scene code #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<graphics.h> void sticks(); void background(); void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); sticks(); background(); getch(); closegraph(); } void sticks() { //boy circle(260,300,10); line(260,310,260,350); line(260,320,250,350); line(260,320,275,348); line(260,350,270,400); line(260,350,250,400);        //girl circle(290,300,10); line(290,310,290,350); line(290,320,274,346); line(290,320,300,350); line(290,350,300,400); line(290,350,280,400); line(0,400,700,400); } void background() { //moon setfillstyle(SOLID_FILL,15); circle(370,130,20); floodfill(370,130,15);        // ston        arc(150,400,0,180,10);        //graas        line(135,400,140,360);        line(125,400,140,360);        line(130,400,160,360);        line(150,390,160,360);        line(165,40

Car and traffic light code ( Code studio )

Car and traffic light code First of all in this program, we draw a car, in this program we also draw a traffic light. When we run this program, the car will start and start running, then after some time the traffic light will be late and the car will stop and after that the countdown will run for 5 seconds and the green light will burn after that. The car will start moving  #include<iostream.h> #include<conio.h> #include<graphics.h> #include<dos.h> void program_start(); void stop_car(); void cout_down(); void last_step(); void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); //starting program_start();        //stop car        stop_car();        //cout down       cout_down();      //last step      last_step(); getch(); closegraph(); } void program_start() { for(int i=0;i<=250;i++) { //car body ellipse(110+i,335,400,135,150,90); line(1+i,271,1+i,300); line(1+i,300,37+i,300); circle(53+i,300,17); line(