Answer the question
In order to leave comments, you need to log in
How to find the perimeter of a circle inscribed in a square using a for loop?
Knowing the length of the side of the square 78 and the radius of the inscribed circle 39, you need to use the for loop to calculate how many points fall within the radius of the circle, thereby finding out its perimeter. Understanding how to do it does not come at all.
Answer the question
In order to leave comments, you need to log in
After a discussion in the comments (6084 points on the perimeter of the square and you need to understand how many of them are included in the circle) (however, I still don’t understand where the “perimeter of the square” is) the task comes down to a simple check
distance from the point to the center of the shape <= radius of the circle.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question