Deepawali C Programming Wishes in 2022

Deepawali C Programming Wishes in 2022
Deepawali C Programming Wishes in 2022

    Deepawali C programming wishes in 2022

    Deepawali C programming wishes Happy Dewali Wishes: C Programming language Dewali Wishes Program. This program best wishes in programming languages. it can be used in every programming language. 

    So this code is run only on turbo C++ Software used to run this program. you can run only one time 

    than Shown Output Screen imaging.


    Diwali Wishes Turbo C Language Programmer Style

    Diwali Wishes Turbo C Language Programmer Style


    Diwali Wishes C Language: A c program that will launch a rocket and wish you a Happy Diwali in programmer style. This program will work with Turbo C++ compilers, however, online compilers will not work as multiple assets cannot be initiated and key elements such as header files include <graphics.h>.

    Diwali Wish Programmer Style

    #include<conio.h>

    #include<graphics.h>

    #include<stdio.h>

    #include<math.h>

    #include<dos.h>


    int 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 ENTER TO LAUNCH 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);

    }


    cleardevice();

    kk = 0;

    for (j=100; j<350; j++)

    {

    if (j%20==0)

    {

    setcolor(kk);

    kk=kk+3;

    delay(50);

    }

    ellipse(320, 30, 0, 360, j+100, j+0);

    }


    for (j=100; j<350; j++)

    {

    if (j%20==0)

    {

    setcolor(BLACK);

    delay(2);

    }

    ellipse(320, 30, 0, 360, j+100, j+0);

    }


    cleardevice();

    i = 0;

    while (!kbhit())

    {

    setcolor(i++);

    settextstyle(GOTHIC_FONT,HORIZ_DIR,5);

    outtextxy(70, 150, "Codeswithbaby Wishes You A Happy Diwali!!");

    delay(90);

    }


    getch();

    return 0;

    }


    Diwali Wish Programmer Style in C Language

    // C Programming Language Program to Celebrate DEEPAVALI ...

    #include<graphics.h>

    #include<conio.h>

    #include<stdio.h>

    #include<dos.h>

    void main()

    {

    int i=0,gd=0, gm;

    initgraph(&gd,&gm,"C:\\TC\\BGI");

    while(!kbhit())

    {

    int val=rand()%16;

    settextstyle(i/200,0,3);

    outtextxy(160,100,"HAPPY DEEPAVALI");


    settextstyle(2,0,6);

    setcolor(11);

    outtextxy(145,140,"WISHING YOU A HAPPY FESTIVAL OF LIGHTS");

    outtextxy(180,160,"FILLED WITH JOY AND PROSPERITY");


    setcolor(val);

    settextstyle(8,0,3);

    outtextxy(200,190,"CODESWITHBAY");


    //___FIREWORKS!

    setcolor(val);

    rectangle(520,70,580,62);

    rectangle(100,70,160,62);

    arc(520,65,165,195,i/2);

    arc(160,65,345,15,i/2);

    line(120,400,150,450);

    line(120,400,85,450);

    line(85,450,150,450);

    arc(120,400,70,110,i);


    line(520,400,550,450);

    line(520,400,485,450);

    line(485,450,550,450);

    arc(520,400,70,110,i++);

    setfillstyle(5,LIGHTRED);

    ellipse(300,390,0,360,55,14);


    floodfill(300,390,val);

    ellipse(349,366,270,269,6,30);

    floodfill(349,366,val);

    ellipse(300,389,180,360,55,60);

    floodfill(320,400,val);

    line(360,390,370,395);

    line(360,380,370,384);

    line(360,370,370,373);

    line(360,360,370,360);

    line(360,350,370,349);

    line(360,340,369,337);

    line(358,335,365,330);

    line(354,330,362,324);

    line(352,326,355,320);

    line(350,330,349,320);


    line(330,395,340,390);

    line(330,384,340,380);

    line(330,373,340,370);

    line(330,360,340,360);

    line(330,349,340,350);

    line(330,337,339,340);

    line(334,329,342,333);

    line(337,324,346,330);

    line(343,320,348,326);

    delay(10);

    if(i==200)

    {

    i=0;

    cleardevice();

    }

    }

    getch();

    closegraph();

    }


    Diwali Wish Programmer Style in C++


    Happy Diwali Wish C++Programmer Style

    Diwali Wishes Program: A C++ Program that will launch firecrackers with the launch() function and also displays any Diwali you wish. This function fundamentally calls upon the mess() function that will display the Diwali greeting and the fire() function that will call another function, the cracker() function. Notably, the cracker() function allows multiple firecrackers to become activated. If you wish, then you can even use sine or cosine functions for creating three-dimensional fireworks and various other effects.

    Diwali Wish Programmer Style in C++

    #include <conio.h>

    #include <graphics.h>

    #include <stdio.h>

    #include <time.h>

     

    void crackers()

    {

        setfillstyle(SOLID_FILL, RED);

        line(80, 680, 130, 680);

        line(80, 680, 105, 630);

        line(105, 630, 130, 680);

        floodfill(105, 650, 15);

     

        setfillstyle(SOLID_FILL, BLUE);

        line(300, 680, 350, 680);

        line(300, 680, 325, 630);

        line(325, 630, 350, 680);

        floodfill(325, 650, 15);

     

        setfillstyle(SOLID_FILL, BROWN);

        line(500, 680, 550, 680);

        line(500, 680, 525, 630);

        line(525, 630, 550, 680);

        floodfill(525, 650, 15);

     

        setfillstyle(SOLID_FILL, GREEN);

        line(700, 680, 750, 680);

        line(700, 680, 725, 630);

        line(725, 630, 750, 680);

        floodfill(725, 650, 15);

     

        setfillstyle(SOLID_FILL, CYAN);

        line(920, 680, 970, 680);

        line(920, 680, 945, 630);

        line(945, 630, 970, 680);

        floodfill(945, 650, 15);

    }

     

    void fire()

    {

        int v = 625, u = 630, g = 630, h = 625,

            a = 325, n = 325, e = 325, x = 320, j = 330;

        int b = 525, m = 525, f = 525, y = 520,

            k = 530, c = 725, i = 725, o = 725,

            z = 720, l = 730;

        int t = 630, s = 625;

     

       crackers();

     

        while (h != 435) {

            crackers();

     

            line(n, g, n, h);

            line(m, u, m, v);

            line(o, u, o, v);

            line(a, u, x, v);

            line(b, u, y, v);

            line(c, u, z, v);

            line(e, t, j, s);

            line(f, t, k, s);

            line(i, t, l, s);

     

                  a = a - 10;

            x = x - 10;

            u = u - 10;

            v = v - 10;

            g = g - 10;

            h = h - 10;

            b = b - 10;

            y = y - 10;

            c = c - 10;

            z = z - 10;

            t = t - 10;

            s = s - 10;

            e = e + 10;

            f = f + 10;

            i = i + 10;

            j = j + 10;

            k = k + 10;

            l = l + 10;

     

                  delay(30);

        }

    }

     


    void mess()

    {

        settextstyle(8, 0, 5);

     

        outtextxy(200, 350, "HAPPY DIWALI ALL OF YOU!");

    }

     

    void launch()

    {

        int q1 = 630, q2 = 590;

     

      

        while (q2 != 330) {

            cleardevice();

     

            fire();

            mess();

     

            line(105, q1, 105, q2);

            line(945, q1, 945, q2);

     

            q1 = q1 - 20;

            q2 = q2 - 20;

     

            fire();

            mess();

     

            delay(30);

        }

    }

     

    void main()

    {

        int gd = DETECT, gm;

     

        initgraph(&gd, &gm, "C:\\"

                            "turboc3\\bgi");

     

        launch();

     

        setfillstyle(SOLID_FILL, WHITE);

        circle(105, 370, 20);

        floodfill(104, 371, 15);

        floodfill(106, 371, 15);

     

        setfillstyle(SOLID_FILL, WHITE);

        circle(945, 370, 20);

        floodfill(944, 371, 15);

        floodfill(946, 371, 15);

     

        getch();

     

        closegraph();

     

        return 0;

    }


    Post a Comment

    0 Comments
    * Please Don't Spam Here. All the Comments are Reviewed by Admin.