Birthday Cake

 How to make a cake in C program | C/C++ graphics | By Source Code

Hello friend today in this video i will show you how to make a cake in c/c++ graphics if you want to learn then watch till the end.


click here to see this video on youtube

/* Source Code */

#include<stdio.h> #include<conio.h> #include<dos.h> #include<graphics.h> void main() { int gd=DETECT,gm,i,j,k; initgraph(&gd,&gm,"c://turboc3//bgi"); for(i=1;i<=50;i++) { setcolor(YELLOW); ellipse(319,239+i,180,360,200,50); setcolor(RED); ellipse(319,239,0,360,200,50); setfillstyle(1,RED); floodfill(319,239,RED); } for(j=1;j<=50;j++) { setcolor(LIGHTRED); ellipse(319,189,0,360,120,30); setfillstyle(1,LIGHTRED); floodfill(319,189,LIGHTRED); setcolor(YELLOW); ellipse(319,189+j,180,360,120,30); } for(k=1;k<=50;k++) { setcolor(RED); ellipse(319,149,0,360,80,15); setfillstyle(1,RED); floodfill(319,149,RED); setcolor(YELLOW); ellipse(319,149+k,180,360,80,15); } getch(); closegraph(); }

Comments

Post a Comment