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
kkurt [141]
4 years ago
10

Write a program to find the transpose of a 5x5 matrix. You have toask the user to enter the values for input matrix. Transpose i

sobtained by interchanging the rows and columns of the input matrix.Aij --> Aji. For example, if A is
1 4 6
2 9 5
6 3 6
Computers and Technology
1 answer:
skelet666 [1.2K]4 years ago
4 0

<u>C++ program for finding transpose of matrix</u>

#include<iostream>  

using namespace std;  

//driver function

int main()

{  

int matrix[5][5], transpomat[5][5], r, c;  

//Taking row number as input from user and storing in r  

cout<<"Enter the number of row: ";  

cin>>r;  

//Taking column number as input from user and storing in c

cout<<"Enter the number of column: ";  

cin>>c;  

/* Taking elements of matrix as input from user

*/  

cout<<"Enter elements: "<<endl;  

for(int a =0;a<r;a++) {  

for(int b=0;b<c;b++) {  

cin>>matrix[a][b];  

}  

}  

// Loop for finding transpose matrix

for(int a=0;a<r;a++) {  

for(int b=0;b<c;b++) {  

transpomat[b][a] = matrix[a][b];  

}  

}  

//Printing the transpose matrix  

cout<<"Transpose of Matrix: "<<endl;  

for(int a=0;a<c;a++) {  

for(int b=0;b<r;b++) {  

cout<<transpomat[a][b]<<" ";  

/* Formatting output as a matrix  

*/  

if(b==r-1)  

cout<<endl;  

}  

}  

return 0;  

}

<u>Output</u>

Enter the number of row:3

Enter the number of column:3

Enter elements:

1 4 6

2 9 5

6 3 6

Transpose of Matrix:

1 2 6

4 9 3

6 5 6

You might be interested in
You have just finished entering field names for your database . You need to choose the primary key or key field but none of your
Luden [163]

C. Let the database assign a unique number in a new field

3 0
3 years ago
Read 2 more answers
)In a vector implementation of a stack ADT, you add an entry to the top of a stack using which vector method?
kotykmax [81]

Answer:

B.add.

Explanation:

boolean add(element)

The add method in java inserts an element in the vector.It's return type is Boolean it returns true if the element is successfully inserted in the vector and false if the operation is unsuccessful.There is no Push operation in vector.Hence we conclude that the answer is add.

8 0
3 years ago
What happens when you click on the colors button in excel?
borishaifa [10]
It writes in that color.
7 0
3 years ago
Each TextField has a text property that's returned by its textProperty method as a StringProperty. The StringProperty method ___
masha68 [24]

Answer:

B: Bind

Explanation:

JavaFX property binding permits the synchronization of the value of two properties in such a way that whenever there is a change in one of the properties, there is an immediate update on the value of the other property. In this way, The StringProperty method bind receives an ObservableValue as an argument. When the ObservableValue changes, the bound property is updated accordingly.

4 0
3 years ago
Write measure five safety measures can be taken to stay safe in social media​
alexdok [17]

Answer:

  1. <u>Use a strong password</u>.
  2. <u>Use a different password for each of your social media accounts</u>.
  3. <u>Set up your security answers. </u>
  4. <u>If you have social media apps on your phone, be sure to password protect your device.</u>
  5. <u>Be selective with friend requests. </u>

5 0
2 years ago
Read 2 more answers
Other questions:
  • A search engine that crawls uses
    7·1 answer
  • Before sharing a document, you must first save the document to
    12·1 answer
  • If you wanted to round $3.99 located in Cell B3 to the nearest dollar, what is the correct Microsoft excel formula?
    6·2 answers
  • Whenever I ask a question I loose points I just asked a question before and I had 56 points now I have 12 now I'll probably have
    14·1 answer
  • Write a function called lucky_sevens that takes in one #parameter, a string variable named a_string. Your function #should retur
    15·1 answer
  • When a hardware or software interrupt occurs, the CPU calls________
    14·1 answer
  • During active listening, which response is NOT an example of providing feedback to the speaker to show that you understand his o
    15·1 answer
  • What is the definition of the word uproot?
    15·1 answer
  • What is internet?<br>what is online?​
    5·1 answer
  • Which tags do you use to write the header and items of an ordered list on a web page?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!