
PROGRAM intrinsic_function_4
	IMPLICIT NONE

	! This program demonstrates the use of an intrinsic function.
	! Fortran90 contains a large library of common and useful functions.

	! declarations
	REAL :: x,y,z,pi
	! note the INTRINSIC attribute of the functions ABS,SQRT,ATAN
	REAL, INTRINSIC :: ABS,SQRT,ATAN

	! inputs
	PRINT *, 'Enter x'
	READ *, x

	pi = 4.0*ATAN(1.0)
	y = ABS(x)
	z = SQRT(pi*y)

	! outputs
	PRINT *,'the value of pi is ',pi
	PRINT *,'the absolute value of ',x,' is ',y
	PRINT *,'the square root of ',pi*y,' is ',z

END PROGRAM intrinsic_function_4
