type :: Point2d
real :: x
real :: y
End type
type(Point2d) :: a, b
Read '(f10.4, f10.4)', a
Read '(f10.4. , f10.4)', b
Print*, distance (a, b)
Contains
실제 함수 distance (this, other)
Type (point 2d), Intent (input) :: this, other
Distance = sqrt((a % x-b % x)* * 2+(a % y-b % y)* * 2)
함수 종료
프로그램 종료