📜  用于图形的在线 c 编译器 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:41.099000             🧑  作者: Mango

代码示例6
#include 

#include 

#include 

#include 

int main()

{

int x,y,r,midx, midy,color:

float t:

int gdriver=DETECT, gmode:

initgraph(&gdriver, &gmode, "CENNTUNNBGI");

midx=getmaxx()/2;

midy-getmaxy()/2;

r=10;

color=12;

setcolor (12);

setfillstyle (1,12);

settextstyle(0,0,3);

do

{

outtextxy(midx-220,35, "I LOVE PROGRAMMING"); outtextxy(midx-175, midy+180, "ROHIT TECH STUDY"); 

for(t=0;t<(2*M_PI);t+=0.01)

{

x=(r*16*sin(t)*sin(t)*sin(t))+midx

y=(r*(1-2)*(13*cos(t)-5*cos(2 t)-2*cos(3*t)-cos(4xt)))+(midy-30); pieslice(x,y,0,360,5);

pieslice(x,y,0,360,5);

}

floodfill(midx, midy,color); color=random(15)+1; setcolor (color); setfillstyle(1,color);

while (!kbhit());

getch();

closegraph();

return 0;

}