***
*
* Testing input/output - Jim M.
*
* See for example 
* http://gershwin.ens.fr/
* vdaniel/Doc-Locale/Langages-Program-Scientific/Fortran/Tutorial/
* 
***
      program Jim1

      integer i
      character answer

c     Note that f77 doesn *not* initialize i to zero.
      write(*,*) 'Intial value of i is ', i

c     Here's what reading and writing an integer looks like.
      do k = 1, 2
         write(*,*) 'Input a new value for i : '
         read(*,*), i
         write(*,*) 'i is now ', i
      enddo

c     You don't have to user only integers for input/output menus.
      write(*,*) 'Are we having fun yet? (yes/no) '
      read(*,*) answer
      if ( answer .eq. 'y' ) then
         write(*,*) "I'm so glad."
      else
         write(*,*) "Aww... why not?"
      endif

c     To be on the safe side, convert explictly to real sin(1.0*i),
c     not sin(i). And don't use 1/sin()... "1" is an integer, not a real.
      write(*,*) '1.0/sin(1.0*x) is ', 1.0/sin(1.0*i)

      end
