Display a message with emoji animation in C

Whatsapp

https://www.fundaofwebit.com/post/c-program-to-display-a-message-with-emoji-animation

Below is the c program to display message and draw a smiley with animation smile in Computer Graphics using C programming.

#include<stdio.h>
#include<stdlib.h>
#include<graphics.h>
#include<dos.h>
void main()
{
    int gd=DETECT,i, gm;
    initgraph(&gd, &gm, "");
    // To Draw the outer triangle
    rectangle(100,100,600,400);
    outtextxy(300,50"Birthday Wishes");
    outtextxy(250,150,"Happy Birthday Om Prakash N");
    // To Draw the face
    circle(300,250,50);
    
    // To Draw the left Eye
    circle(280,240,8);

    // To Draw the right Eye
    circle(320,240,8);

    for(i=0;i<=50;i+=10)
    {
        setcolor(WHITE);
        // To Draw the smile in White color
        arc(300,250,220,270+i,20);
        delay(500);
        // To erase the smiley, draw the smiley 
        //on the same position using black color
        setcolor(BLACK);

        // To Draw the smile in Black color
        arc(300,250,220,320,20);
        delay(500);
    }
    // To Finally Draw the smile in White color
    setcolor(WHITE);
    arc(300,250,220,320,20);
    getch();
    closegraph();
}

Output :


© Copyright - 2018 - 2022 | All rights reserved at Funda of Web IT