transposematrixc - } int main(){ int a[n][m] =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include<stdio.h> int f(int n, int m, int a[n][m], int t[m][n]) int f(int n,int m,int a[n][m],int t[m][n]){ int i,j for(i=0 i<n i++) { for(j=0 j<m j++) { t[j][i] = a[i][j] } } return a[i][j]
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } int main(){ int a[n][m] = {1,2,3,4,5,6} int t[m][n]=0 int i,j f(2,3,a,t) for(i=0 i&lt;2 i++){ for(j=0 j&lt;3 j++){ printf(&quot;%f&quot;, t[j][i]) } printf(&quot;\n&quot;) } return 0 }...
View Full Document

This homework help was uploaded on 04/18/2008 for the course EME 5 taught by Professor Staff during the Fall '08 term at UC Davis.

Ask a homework question - tutors are online