CSCI 261 - Programming Concepts (C++)Fall 2016 - Lab 07CQuick Links: Blackboard | EECS | Mines | Piazza | zyBooks |
|
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |
This lab is due by October 19, 2016 08:00am.
ConceptsIf you've taken linear algebra, then you know what the transpose of a
matrix is. If not, that's OK, as the concept is pretty simple. Basically the
transpose of a matrix is a new matrix where the rows become the columns
and the columns become the rows (a reflection). See
Wikipedia for more details.
Get StartedChanging the size of an array is easier to
do when the numbers of rows and columns are specified as symbolic constants;
otherwise the change requires modifications to several statements. Thus, to
get started, create two global
constants NROWS and NCOLS which are assigned the values
4 and 2, respectively.
Then, in your
main() function, declare a 2D array
that is of size
NROWS and NCOLS. Transpose It!In this lab, create the following four functions. Three of the four functions
should have one parameter, a 2D array of size NROWSxNCOLS; the
transpose function also needs a second 2D array parameter, of size
NCOLSxNROWS.
Please enter 2 integers, for row 0: 5 7
Please enter 2 integers, for row 1: 754 -34 Please enter 2 integers, for row 2: 486763 979 Please enter 2 integers, for row 3: 333 999 In summary, your main function should:
Lab Submission
You will submit your solution to this lab with the rest of Week07. Detailed instructions for doing this are posted in Assignment 07.
This lab is due by October 19, 2016 08:00am.
| |
Last Updated: 01/01/70 00:00
|