Write a C++ program to \"draw\" ellipses by printing characters, to the followin
ID: 3646708 • Letter: W
Question
Write a C++ program to "draw" ellipses by printing characters, to the following specifications:Prompt the user for values for a and b, then draw an ellipse using the formula
(x2/a2)+(y2/b2)=1. Actually, since double values in C++ are rarely exact, use (x2/a2)+(y2/b2)-1.0<0.0001, but use a named constant in place of 0.0001.
Since there are 25 rows in a standard PuTTy screen, output 24 rows for the ellipse. For each row number row 0 to 23, let y be 12-row.
Since there are 80 columns in a standard PuTTy screen, output 80 characters in each line. Since each column is equivalent to about half a row in terms of space, for each column number col 0 to 79, let x be (40-col)/2.
Use pow from <cmath> to calculate the squares, ensuring that the two parameters are of type double.
After the ellipse, output information about it and prompt to repeat or not.
If it is a circle, output the word Circle, the radius of the circle (either a or b), the area of the circle and the number of characters printed in the "drawing", as in the first example.
If it is not a circle, output the word Ellipse, both a and b, the area of the ellips and the number of characters printed, as in the second example.
The area of an ellipse is ? * a * b. Use M_PI from <cmath> for the value of ?.
All floating point numbers should be output in fixed format, always showing the point and with a precision of 2 places after the point.
Every variable must have a comment explaining briefly what it is for.