346767970 - CPSC165 Assignment#1 30 Points Problem1 15...

Info icon This preview shows pages 1–2. Sign up to view the full content.

CPSC165 Assignment#1 30 Points Problem1 15 Points 1. Create a two dimensional array called Matrix1 of size 3X3. 2. Populate it with 1 through 9. 3. Print Matrix1 row by row, it must look like: 1 2 3 4 5 6 7 8 9 4. Declare another array of same size called Matrix2 5. Transpose the contents of Matrix1 into Matrix2. 6. Print Matrix2 which must look like: 1 4 7 2 5 8 3 6 9 Transpose of an array is when the contents of the row and column are reversed. No extra variables are allowed. No hardcoding is acceptable. You must accomplish this with as few lines of code as possible.
Image of page 1

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

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '15
  • Print Matrix1 row

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern