Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to recursively draw circles as shown below. 1. User will give a radius as argument within the range of 10 50 and the

You are to recursively draw circles as shown below.

1. User will give a radius as argument within the range of 10 50 and the x and y coordinate that will become the center of the circle. Fix coordinates of the center point of the circle at x = 100 and y = 50.

2. Implement a function drawCircles that is recursive (calls itself)

3. The function must draw a circle of radius sent in parameter.

4. Must call itself with new radius that is half of the last circle drawn, in such a way that all circles touch the circumference of each other (like in the diagram below. HINT: keep y coordinate same for every call and change x coordinate by adding the (old_radius + new_radius) into it! ) and keep getting smaller until the radius becomes 1 and then it must stop.

HINT: Use library graphics.h for drawing

NOTE: The code should be in C Language with the exception of C++ libraries. Thanks.

ALSO: The software I use is " DEV C++ ". image text in transcribed

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

Step: 3

blur-text-image

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

ISBN: 1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

How would you go about deciding if COPPA has been effective?

Answered: 1 week ago

Question

please dont use chat gpt or other AI 1 5 . .

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago