create a circle structure to store the folliwubg data radis
create a circle structure to store the folliwubg data -radis center x center y and area
ask user to enter the number of circles to create/create that many circle sturcturs using an array pointer
for each circle randomly generte the data for the radius center x center y and calculat the area
printe out radius center x center y and area of the circle
search through each circle print out the datta for the circles whose area is greater than 10000 n
use only pointer
#include
using namespace std;
int num;
struct circlestruct
{
int radius;
int CenterX;
int CenterY;
double Area;
};
int main()
{
cout << \"Enter the number of Circles to be created: \" << endl;
cin >> num;
circlestruct *numberofcircle = new circlestruct[num];
int areacode;
double pi = 3.16;
for(int count = 0; count < num; count++)
{
cout << \"Enter the radius: \" << endl;
cin >> (*(numberofcircle + count)).radius;
cout << \"Enter the centerX: \" << endl;
cin >> (*(numberofcircle + count)).CenterX;
cout << \"Enter the CenterY: \" << endl;
cin >> (*(numberofcircle + count)).CenterY;
cout << \"Enter the Area: \" << endl;
cin >> (*(numberofcircle + count)).Area;
}
areacode = pi * pow(*(numberofCircle + count).radius, 2);
return 0;
}
**** Hi this is my code - what am I doing wrong -c++
Review Test Submission X lackboard morehouse.edu/webapps/assessmentireview/review.jsp?attempt id .555585 18course id .31604 18content id 343022 18outcome id 569752 1&outcome; definition Time Elapsed 1 hour, 42 minutes Instructions This test is closed book, but you can use your complier and past code (in your complier) help with the problems. o Question 1 Step 1 create two integer pointers of size Needs Grading function 4 Each element of the both array pointers should be filled with random numbers from o to 100. Pass the address of both array pointers into a called mergeArrays. Step 2: Inside the function, merge both arrays together into one pointer array of size 8, en return a pointer to the new merged array. Step 3: Back in the main function, print out the contents of array 1 and 2 separately, then print out the contents of the merged array Use only pointer notation Question 2 Needs Grading Write a program that asks the user to enter a few sentences. Then print out the number of sentences they entered. Question 3 Needs Gradmg Step 1: Create a Circle structure to store the following data: Radius. Center X, Center Y, and Area Step 2: Ask the user to enter the number of circles to created. Then create that many Circle structures using an array pointer Step 3 For each circle, randomly generate the data for the Radius, center x, Center Y, and calculate the Area. Step 4: Print out the Radius. Center x, Center Y. and Area for each circle Step 5: Search through each circle, and print out the data for the circles whose area is greater than 10,000 Use only pointer notation Wednesday, February 22, 2017 3:34.47 PM ESTSolution
#include <iostream>
#include <stdlib.h>
#include <ctime>
using namespace std;
int num;
struct circlestruct
{
int radius;
int CenterX;
int CenterY;
double Area;
};
int main()
{
srand(time(NULL));
cout << \"Enter the number of Circles to be created: \" << endl;
cin >> num;
circlestruct *numberofcircle = new circlestruct[num];
circlestruct *ptr = numberofcircle;
double pi = 3.14;
for(int count = 0; count < num; count++)
{
int r = rand() % 100;
int x = rand()%10;
int y = rand()%10;
(numberofcircle + count)->radius = r;
(numberofcircle + count)->CenterX = x;
(numberofcircle + count)->CenterY = y;
double area = pi*r*r;
(numberofcircle + count)->Area = area;
cout << \"X: \" << x << \" Y: \" << y << \" Radius: \" << r << \" Area: \" << area << endl;
}
cout << \"Details of circle with area greater than 10000\"<<endl;
for(int count = 0; count < num; count++)
{
if ((numberofcircle + count)->Area > 10000)
{
int r = (numberofcircle + count)->radius;
int x = (numberofcircle + count)->CenterX;
int y = (numberofcircle + count)->CenterY;
double area = (numberofcircle + count)->Area;
cout << \"X: \" << x << \" Y: \" << y << \" Radius: \" << r << \" Area: \" << area << endl;
}
}
return 0;
}


