Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Outline some key aspects and contemporary issues in IHRM

Answered: 1 week ago

Question

What did they do? What did they say?

Answered: 1 week ago