Home /
Expert Answers /
Computer Science /
c-programming-language-code-in-the-figure-below-we-plot-the-graph-of-a-circle-with-radius-4-th-pa496
(Solved):
C Programming language code
In the figure below, we plot the graph of a circle with radius 4 . Th ...
C Programming language code
In the figure below, we plot the graph of a circle with radius 4 . The equation of the circle is x2+y2=r2, where r is radius of the circle. Write a program that will take the radius as input from the user and will print the corresponding circle. The circle should be printed: - using the character ?. - in a dotted . grid square of size 2r+1 by 2r+1. - in the center of the dotted grid square. Hint: You will find x2+y2=r2 helpful, and use the following figure to help you decide on the coordinates of the points to be printed. Figure 1: Circle Here is a sample output from an execution of the program: Example 1: Enter the radius of the circle: 3< enter> ...o.. .00000. .00000. 0000000 .00000. .00000 ..o... Example 2: Enter the radius of the circle: 1<enter> .o. 000 .o.