Question: C++ Language: Pls do in code blocks. Not Secure - chabotcollege.edu Chapter 5 H.. Solved: A by- Files How to Dasi... G Model this... G

C++ Language: Pls do in code blocks.

C++ Language: Pls do in code blocks. Not Secure - chabotcollege.edu Chapter5 H.. Solved: A by- Files How to Dasi... G Model this...

Not Secure - chabotcollege.edu Chapter 5 H.. Solved: A by- Files How to Dasi... G Model this... G model this L... Model this c... G CS15 Keith... www.chabot... C Get Homew... + CSCI-15 Assignment 3, 2-d arrays, due 3/11/21 This assignment in two similar programs, 50 points for the first, 35 for the second, 85 total points The first program is three functions as well as main(). Write a function clearArray ( that takes a 2-d array (of a known row length) and the number of rows in the array, and clears all of the array elements to zero. Write a function makeSpiral (that takes a two-dimensional array of a known tow length) and the number of rows and columns to fill, and fills the rows by columns corner of the array with the integers from 1 to (Tuws + columns) in a clockwise spiral pattern starting from a1010 in the upper left, and going right, then down, then left, then up, filling the array with values; and then moving in one now and column on each edge, continuing until you run out of TUWS or columns. For example, with a 5 by 6 array and filling a 4 by 4 comer, the result will look like this (ignoring the zero values). 2 3 4 s 0 1 4 Tuwcolumn 0 1 2 3 12 1 2 13 16 9 14 15 8 S 6 10 7 7 4 The makeSpiral O function will not change anything in the rest of the array. Write a function print.Spiral that takes a 2-d array (of a known row length) and the number of rows and columins to print and prints the spiral in the urray in a reasonable format. Don't print the row or column numbers or the zeroed elements, just the spiral. All 3 of these functions will use [][] notation for the array parameters, Then write a program that declares a 15 by 20 array of ints, then loops, calling cuatrray then calling makospiral() (with various values for the size of the comer to fill), and then calling printSpiral() with the same sizes to print the spiral. You may use other functions if your design needs them. All output should be to a text file. Pass the output file name to the program on the command line via argc and argv[]. This program will not have any input. Send me tests with at least the following corner sizes, plus several of your own choice: 1 by 1, 2 by 2,3 by 3, 4 by 4, 5 by 5, 4 by 7,7 by 4, 15 by 20 Not Secure - chabotcollege.edu Chapter 5 H.. Solved: A cy Files How to Dasi. G Model this... G model this L... Model this GCS15 Keith www.chabot... c Get Homew... + Thought experiment: This program has no input (not counting the command-line parameter, which is not input from the program's point of view). How can you pass in multiple comer sizes to the makeSpiral and printspiral() functions without prompting for the values or placing multiple (separate) calls to makespiral() and printspiral in the code? The second program is a rewrite of the first, but not using 10 notation anywhere. The second program is a rewrite of the first. The functions will take an int as the parameter for the base of the array, not using [C] notation. The rows and columns parameters will be the actual sizes of the various arrays. Your main() will declare multiple 2-d arrays of different sizes rather than a single large array. The program will low as above, but instead of passing in the dimensions of a corner of a big array, they will pass in the actual dimensions of the various arrays. Do the same things with the arrays inside mainly's loop: fill with zeros, make the spirals, print the spirals. You will need to use the base+offset model from matrices.cpp as a model for this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!