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
"A software package developed to handle information requirements for a specific type of business is called a horizontal applicat
goldfiish [28.3K]

Answer:

<h3>False </h3>

Explanation:

Vertical application software it the software which if build as per the specific requirements for achieving specific processes and functions which are unique to a user or business. These softwares are customised as per the needs of an organisation or enterprise. these applications are useful for organisations operating in marketing, sales, inventory etc but cannot be used by other businesses. They are built to target specific users. ERP(Enterprise Resource Planning ) and CRM (Customer Relationship Management ) are examples of vertical applications.

3 0
2 years ago
Read 2 more answers
Describe how a black and white image could be represented in binary
SIZIF [17.4K]

Answer:

Each pixel in an image is made up of binary numbers. If we say that 1 is black (or on) and 0 is white (or off), then a simple black and white picture can be created using binary. To create the picture, a grid can be set out and the squares coloured (1 – black and 0 – white).

5 0
3 years ago
Read 2 more answers
Which of the following are the lines defining the borders of a shape? (1 point)
shtirl [24]

Answer:

no I is edges

2 is gaming

3 is creativity

3 0
3 years ago
Why is it helpful hat the ribbon tabs can collapse
UkoKoshka [18]
This is helpful in order to have a larger space to work in.

Being able to collapse the ribbon gives the user a larger document to work with instead of focusing on what they’re typing as well as extra effects.

Hope this helps!
4 0
2 years ago
A department requires access to the database application from monday to friday, 9am to 5 pm. last thursday at 1 pm, the applicat
iragen [17]

Answer:

90%

Explanation:

90%

ELO 4.2 A department requires access to the database application from Monday to Friday, 9AM to 5 PM. Last Thursday at 1 PM, the application crashed, and it took six hours to fix the problem. What was the availability of the application during the week?

6 0
1 year ago
Other questions:
  • Directions Use your imagination and a word processor to write a business letter with two to three paragraphs. Your business lett
    5·1 answer
  • What kind of negative social impact has wireless communications had on today's society?
    6·2 answers
  • Explain 3 ways you can be an upstander when seeing cyberbullying.
    13·2 answers
  • Assume that a variable variable, number Of Sides has been initialized. Write a statement that assigns the value True to the vari
    8·1 answer
  • Photography is harder with digital cameras than with film cameras.<br>true<br>false
    6·2 answers
  • BRAINLIEST You have a small company and want to keep your costs low, but it is important your employees share data. Which networ
    13·2 answers
  • Encryption is an important topic in math and computer science. It keeps your personal information safe online.
    6·1 answer
  • After turning on your computer ,it prompts you to type a password to continue the boot process. However ,you forgot the password
    10·1 answer
  • What is the difference between RELIABLE and UNRELIABLE sources of<br> income?
    7·2 answers
  • 10 sentences about computer parts.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!