Question: Needs to be C + + ( 1 ) Write a program that accepts a 2 - dimensional array ( matrix ) with n rows

Needs to be C++
(1) Write a program that accepts a 2-dimensional array (matrix) with n rows and m columns, where n and m are user-given
and prints out its transpose (i.e., every row in the original matrix becomes a column in the transpose matrix). For example, if the given matrix is
\table[[1,2,3,4],[5,6,7,8],[9,10,11,12]]
the transpose will be
\table[[1,5,9],[2,6,10],[3,7,11],[4,8,12]]
(2) Write a program that reads in a 2-dimensional array (matrix) with n rows and m columns where n and m are user-given and for each column it computes its average.
E.g., for the matrix
123
456
383
the average of 1st column is 3.333333, of 2nd column is 5.0, and of 3rd column is 4.0.
(3) Write a program using nested loops that asks the user to enter a value for the number of rows to display. It should then display that many rows of * and $, with
one * in the first row, two in the second row, and so on. However, the last * in each row should be aligned (preceded by as many $ as necessary).
A sample run would look like this:
Enter number of rows: 5
Then the * and $ should appear like this:
\table[[$,$,$,$,**
 Needs to be C++ (1) Write a program that accepts a

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!