1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
natta225 [31]
3 years ago
13

Write a program (using functions) starting from directives to compute and display the transpose of a matrix of dimension m x n.

[Note: Here, transpose of a matrix means the element at row r and column c in the original is placed at row c and column r of the transpose]. (Programming in C)
Computers and Technology
1 answer:
pentagon [3]3 years ago
3 0

Answer:

#include <iostream>

#include <cstdlib>

using namespace std;

int m, n;

void transpose(int matrix[]){

  int transp[m][n];

  for (int i = 0; i < n; i++){

     for (int j = 0; j < m; j++){

        transp[j][i] = matrix[i][j];

        cout<< transp[j][i]<< " ";

     }

     cout<< "\n";

  }

}

int main(){

  cout<< "Enter the value for n: ";

  cin>> n;

  cout>> "Enter the value for m: ";

  cin>> m;

  int mymatrix[n][m];

  for (int i = 0; i < n; i++){

     for (int j = 0; j < m; j++){

        mymatrix[i][j] = (rand() % 50);

     }

  }

  transpose(mymatrix);

}

Explanation:

The C source code defined a void transpose function that accepts a matrix or a two-dimensional array and prints the transpose on the screen. The program gets user input for the row (n) and column (m) length of the arrays. The C standard library function rand() is used to assign random numbers to the array items.

You might be interested in
There are ___ Federal Reserve Banks. Each bank is also in charge of its assigned District Banks.
s344n2d4d5 [400]
B. 12

There are 12 Federal Reserve Banks. Each bank is also in charge of its assigned District Banks.

6 0
3 years ago
An international magazine publisher has commissioned you to do a series of images in black and white. The publisher distributes
CaHeK987 [17]

Answer:

I need to send black-and-white images in a print-ready format. Therefore, here are the steps I’d follow:

First, I’d shoot my images.

I’d use Photoshop to modify or correct the color of the images.

I’d convert the images into black-and-white versions.

I’d save the selected files in the TIFF format. This method will ensure that the images retain their quality and are print-ready.

I’d also convert these files into the JPEG format to get good-quality, low-resolution images for the client’s web publishing.

The Art Director requires images that they can modify, if required. Therefore, I’ll include files in the TIFF and PSD formats. These are open files and anyone can modify them.

I’d send all these saved copies to the magazine for their work.

Explanation:

just did it and it gave me this answer:)

5 0
3 years ago
What could have made you redesign your plan? Select 3 options.
Masteriza [31]

Answer:

so that their username will still be used and so the can renember the username

Explanation:

that is why

5 0
3 years ago
Noticing his reduced performance at work, Dan enrolled himself for training sessions offered by the company and saw his producti
Luden [163]

A. self-efficacy.

B. overreward inequity.

C. expectancy.

D. cognitive distortion.

Answer:B. overreward inequity.

Explanation: Overreward inequity is a term mostly associated with the feeling of guilt by an employee who believes that his contributions to work or his performance rating is less than what he or she is been paid for.

An employee with this kind of guilt feelings will mostly like do his or her best to engage in in performance improvement Activities which includes enrollment for training and classes to enhance his or her performance.

6 0
3 years ago
This isn't about school but every time it tells me to watch an ad to unlock the answer to a question it prompts a survey and it
Masja [62]
Restart it than see what happens
4 0
3 years ago
Read 2 more answers
Other questions:
  • Refer to the exhibit. A web designer calls to report that the web server web-s1.cisco is not reachable through a web browser. Th
    15·1 answer
  • Which aperture setting will give the shallowest depth of field?
    10·2 answers
  • We want to construct a memory with 256 bytes in capacity. Assume that each byte has a unique address. (a) How many address lines
    14·1 answer
  • a corporation needs an operating system that allows the various teams in its office to network &amp; collaborate on projects. wh
    11·2 answers
  • Sierra owns a small business and handles many responsibilities, from logistics to marketing. She's seen a lot of success with Go
    11·1 answer
  • (2) Design pseudocode for a program that accepts numbers from the user until the special number 555 is entered (you should use a
    12·1 answer
  • In the space provided, analyze the pros and cons of becoming a member of an artistic guild. Your answer should be at least 150 w
    12·1 answer
  • Which is the first computer brought in nepal for the census of 2028 B.S​
    6·1 answer
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
  • The current annual interest rate is 5 percent, and you are taking out a 20-year loan with a monthly end-of-month payment. If you
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!