## Description :

Midpoint Circle Algorithm:
A circle is defined as a set of points that are all at a given distance
r from a center positioned at
.
(x_{c}
,y_{c}).

This is represented
mathematically by the equation

=> (x - x_{c})^{2} + (y - y_{c})^{2} = r^{2}

Using equation (1) we can calculate the value of y for each given value of x as

=> y = y_{c} +- sqrt(r^{2} - (x - x_{c})^{2})

Thus one could calculate different pairs by giving step increments to x and calculating the
corresponding value of y. But this approach involves considerable computation at each step
and also the resulting circle has its pixels sparsely plotted for areas with higher values of
the slope of the curve.

## Program :

## Output :

Written with ♥ from Mangesh.