Math 171 Spring 2005, Lab 13 (double lab)

Due Tuesday, March 29, 11:59 P.M.

  1. Overview
  2. Assignment
  3. Hints

Overview

The purpose of this lab is to introduce you to subroutines in Fortran.

Top

Assignment

Write a Fortran program called dotprod that reads in an integer n from standard input, followed by two real vectors of dimension n. These vectors should then be passed to a subroutine, which writes their dot product to standard output.

Top

Hints

Modify the code given on the board in class so that it only multiplies vectors rather than matrices.

Top

Back to the course information page