Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
TransposeMatrix
//g++ 7.4.0 //Transpose: find transpose of a given matrix //code is created by Rezaul Hoque on January 22,2021 //please contact at jewelmrh@yahoo.com #include <iostream> using namespace std; int main () { double a[3][3]={11,22,33,44,55,66,77,88,99}; double b[3][3]; cout<<"The matrix is:\n"; for (int i=0;i<3;i++) { for(int j=0;j<3;j++) cout<<" "<<a[i][j]; cout<<endl; } for (int i=0;i<3;i++) { for(int j=0;j<3;j++) b[i][j] = a[j][i]; } cout<<"The transpose of the given matrix is:\n"; for (int i=0;i<3;i++) { for(int j=0;j<3;j++) cout<<" "<<b[i][j]; cout<<endl; } return 0; }
run
|
edit
|
history
|
help
0
AVL - ith element
BreakfastMenu array
Hello World C++ - minimal
Wave Sort
project euler problem - 3
Microsoft Question - MaxEmployeeAttendence (original question)
C++ virtual dispose
cppPyPoly2
Dynamic Programming For Combinatorics - 1
მატრიცა#2