Question
THIS IS HOW FAR I HAVE GOTTEN BUT NEED HELP. THE QUESTION IS: You need to create a Circle class that draws a circle on
THIS IS HOW FAR I HAVE GOTTEN BUT NEED HELP. THE QUESTION IS: You need to create a Circle class that draws a circle on the screen as location x/y. Your class needs to read input from a file, the file contains may rows, each row represents the attributes of a circle. The first two values is the X/Y location of the center point of the circle. The next value is the radius, the forth value is the color of the circle. So the input
IF IT IS POSSIBLE I WOULD LIKE HELP WITH WHAT I HAVE NOW AND FOR THE PERSON WHO HELP TO USE WHAT I HAVE AND BUILD OFF IT! PLEASE AND THANK YOU!
#include
#include
#include
#include
using namespace std;
void gotoxy(int column, int line)
{
COORD coord;
coord.X = column;
coord.Y = line;
SetConsoleCursorPosition(
GetStdHandle(STD_OUTPUT_HANDLE),
coord
);
}
int main() {
float n, j, i, p;
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hStdOut, 13);
int x = 20;
int y = 20;
cout << "enter n ";
cin >> n; n = n + 3;
p = floor((4 * n - 2.5) / 5.8);
for (j = p; j >= -p; j--)
{
gotoxy(x, y);
for (i = -n; i <= n; i++)
{
if (p * p * i * i + n * n * j * j <= n * n * p * p)
cout << "*";
else
{
cout << " ";
}
}
//cout << endl;
y++;
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started