c......Example 1(a): Program to do frequency conversion
c23456
      program ex1a
c
      implicit none
c
double precision convert,pounds,dollars
c
c..... assign a value to the conversion rate
c
      convert = 2.56d0
c
c..... Read the amount from the keyboard
c
      print *, 'Enter the amount in pounds'
      read *,pounds
c
c..... Calculate the conversion
c
      dollars = convert*pounds
c
c..... Output the result to the keyboard
c
      print *, pounds, ' pounds = ',dollars,'dollars'
c
      end


Return to Fortran Workshop Main Page


This page maintained by alex.brown@ualberta.ca of the Department of Chemistry, University of Alberta

Last updated August 8, 2003.