Question: I have c code but it is not working on visual studio. can you fix it please? #include #include #include void main() { int DETECT;

I have c code but it is not working on visual studio.

can you fix it please?

#include

#include

#include

void main()

{

int DETECT;

int RED;

int SOLID_FILL;

int gd = DETECT, gm = DETECT;

int x, y = 0, j, t = 400, c = 1;

initgraph(&gd, &gm, "");

setcolor(RED);

setfillstyle(SOLID_FILL, RED);

for (x = 40; x < 602; x++)

{

cleardevice();

circle(x, y, 30);

floodfill(x, y, RED);

delay(40);

if (y >= 400)

{

c = 0; t -= 20;

}

if (y <= (400 - t))

c = 1;

y = y + (c ? 15 : -15);

}

getch();

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!