Ellipse Drawing Program

How do I make a program that prompts the user to enter a Horizontal radius, Vertical radius and a center coordinate? So far I have this which only draws a circle after prompting user to enter radius and I don't know where to go from here.

#include <iostream>
#include <Windows.h>

using namespace std;

int main()
{
while (true)
{
system("cls");
int circle_radius;
cout << "Enter radius" << endl;
cin >> circle_radius;

for (int i = 0; i <= 2 * circle_radius; i++)
{
for (int j = 0; j <= 2 * circle_radius; j++)
{
float distance_to_centre = sqrt((i - circle_radius)*(i - circle_radius) + (j - circle_radius)*(j - circle_radius));
if (distance_to_centre > circle_radius - 0.5 && distance_to_centre < circle_radius + 0.5)
{
cout << "*";
}
else
{
cout << " ";
}
}
cout << endl;
Sleep(50);
}
system("PAUSE");
}
}
Topic archived. No new replies allowed.