Assignment 5


40 points
Due: November 23rd

Write a menu driven Fortan 95 program that provides five options for the user:

  1. Compute square root of an entered number
  2. Matrix Multiplication (Matrix 1 x Matrix 2)
  3. Dot product of two vectors (Vector 1 x Vector 2)
  4. Circular shift of array elements (as the user how many to shift by)
  5. Transpose a matrix (rows -> cols) (ask the user which one to transpose)

For the purposes of this assignment, define two 10x10 matrices and two 20 element vectors and initialize them:
For option 1, use the iterative technique as shown on the fortran sample
For options 4 and 5, the user is to select the Matrix/Vector to operate on. To hand in this assignment, issue the following commands:
  1. script
  2. cat as7.f
  3. gfortran as7.f
  4. ./a.out
  5. Select option 1 with 43
  6. Select option 1 with 21
  7. Select option 2
  8. Select option 3
  9. Select option 4 with Vector 1 and a shift of4
  10. Select option 5 with matrix 2
  11. exit
  12. lpr -PAT224 typescript