! Copywright Tommi Bergman, Jarmo Pirhonen, and Sami Saarinen (Fortran 95 -course at CSC, 2010), last modified Napsu Karmitsa (2015).
PROGRAM distance
  IMPLICIT NONE
  
! TODO Extra: change to arrays 
  REAL :: x1,y1,x2,y2 
  
! Defining the points
! TODO Extra: change to arrays 
  x1=2.2
  y1=1.0
  x2=1.2
  y2=2.0

! TODO: call your function or subroutine here



  WRITE(*,'(A)') 'Distance between points '
  WRITE(*,'(A,f4.2,A,f4.2,A,f4.2,A,f4.2,A)')'a (',x1,',',y1,') and b (',x2,',',y2,')'

! This is how it is done in its easiest. TODO: modify
  WRITE(*,'(A,f4.2)')'is ',SQRT((x1-x2)**2+(y1-y2)**2)


! TODO: write your function or subroutine here (use CONTAINS)

END PROGRAM distance
