Question
Please fill in the planks and please make sure it works on C++ because I going crazy with that ----------------------------------------------------------------------------------------------------------------------------------------------------------- // Creating 2-D dynamically allocated
Please fill in the planks
and please make sure it works on C++ because I going crazy with that
-----------------------------------------------------------------------------------------------------------------------------------------------------------
// Creating 2-D dynamically allocated arrays // 7.4 Generate circle #include
using namespace std;
void displayCircle(char **, int, int); void computeCircle(int, char **, int, int, char*); // FILL IN THE CODE with the two missing prototypes:
int main() { int rows, cols; cout << "Number of rows and columns: "; cin >> rows >> cols; char symbol; cout << "Enter character symbol: "; cin >> symbol; // Create 2-D dynamically allocated array // Clear array // FILL IN THE CODE to call the
// FILL IN THE CODE for a function called
// FILL IN THE CODE to define a pointer to a character pointer (use two *) // called
void clearArray(char **arr, int rows, int cols) { int r = 0; while (r // FILL IN THE CODE for a function called void displayCircle(char **arr, int rows, int cols) { // FILL IN THE CODE for a loop over all the rows and columns // that outputs } const float TWO_PI = 6.28318530717959; void computeCircle(int radius, char **arr, int rows, int cols, char* symb) { float da = TWO_PI/(4*radius); // angle steps in radians int r0 = rows/2; // screen center row int c0 = cols/2; // screen center col int r,c; float a = 0; while (a < TWO_PI) { r = r0 + radius*cos(a); c = c0 + radius*sin(a); // FILL IN THE CODE that sets a = a + da; } }
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