Write a programt that reads a matrix A from standard input,and outputs the matri
ID: 3610592 • Letter: W
Question
Write a programt that reads a matrix A from standard input,and outputs the matrix product A x AT, where AT is the transpose ofA. Input to the program starts with a positive interger ntaht gives the number of columns in A. This integer isfollowed by (m x n) integers that specify, row by row, the elemntsofA. Here, m represents the number of rows in A. Notetaht only n is explicityly specified in the input ( and m countseverytime when computer read " " (enter) ). Integers are separated in the pnput by a white space. That is, between any two integers in the input, there should be atleast one white space character. The matrix product should be displayed to standard outputusing a minimum field with of 3 for each elements, and a singlespace between adjacent fields on the same line. Each row ofthe matrix product should be written on a separate line with noblank lines between rows. Your program should impose a limit of 10 on the number of rowsand columns in the input matrix. That is , m <= 10 and n<= 10. This limit value of 10 should be implemented inyour code as a prerocessor constant (#define). Notethat m and n does not need to be equal... Write a programt that reads a matrix A from standard input,and outputs the matrix product A x AT, where AT is the transpose ofA. Input to the program starts with a positive interger ntaht gives the number of columns in A. This integer isfollowed by (m x n) integers that specify, row by row, the elemntsofA. Here, m represents the number of rows in A. Notetaht only n is explicityly specified in the input ( and m countseverytime when computer read " " (enter) ). Integers are separated in the pnput by a white space. That is, between any two integers in the input, there should be atleast one white space character. The matrix product should be displayed to standard outputusing a minimum field with of 3 for each elements, and a singlespace between adjacent fields on the same line. Each row ofthe matrix product should be written on a separate line with noblank lines between rows. Your program should impose a limit of 10 on the number of rowsand columns in the input matrix. That is , m <= 10 and n<= 10. This limit value of 10 should be implemented inyour code as a prerocessor constant (#define). Notethat m and n does not need to be equal...Explanation / Answer
it's been days and you haven't gotten an answer, so this shouldstart you off. it works for an n*n matrix, a n*m matrix, but not a m*nmatrix, I'm stuck, but I don't understand the math, maybe youcan figure it out please rate - thanks #include #include // needed for getch() intmain() {int a[10][10],b[10][10],i, j,k,n,m,c[10][10]; printf("How many columns in your matrix? "); scanf("%d",&n); printf("How many rows in your matrix? "); scanf("%d",&m); for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.