project1

# project1 - -Iniese Bernard Umah EE150 Project1 Prof Lan...

This preview shows pages 1–3. Sign up to view the full content.

/*--------------------------------------------------- Iniese Bernard Umah EE150 Project1 Prof. Lan Xiang ----------------------------------------------------*/ /*INTRODUCTION: this program will read in matix , and multiply the matrix with ii ts transpose --------------------------------------------------------------------------------- ------------*/ #include <stdio.h> #include <stdlib.h> int matrix( int A[][10], int n) { /* definding the function and n is the column*/ int m,y,i=0,j=0; while(scanf("%d",&y)!=0) {/*making sure that scanf reads in a numeric value*/ A[i][j]=y; j++; if(j==n) { /*this will help in the determing the row,*/ i++; /*at the end the value of m=i will be the number of row*/ j=0; } } m = i; return m; /*this function returns the value of m which is the row*/ } /*Matrix function ends*********************************************************** ********************* --------------------------------------------------------------------------------- --------------------- ---------------Printmatrix function begins--------------------------------------- --------------------- --------------------------------------------------------------------------------- ---------------------*/ void printmatrix(int A[][10], int n, int m) /*this function will print out matixx A in rows and columns*/ { int x,k; printf(" --matrix A--\n"); for (x=0; x<m; x++) {

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
for (k=0; k<n; k++) { printf("%3d ",A[x][k]); } printf("\n"); } } /*------------------------------------------------------------------------------- ----------------------- ---------------------------this is the begining of the main function-------------
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern