PROGRAM prog2A
!Initialise and name the program

	IMPLICIT NONE
	!Assume nothing about the variables used in this program
	REAL(16) :: x, s
	!Declare high-precision real variables for x and sinc(x) respectively
	
	PRINT*, 'What is the argument for which you want to calculate sinc(x)?'
	!Prompt the user to input a value for x
	READ*, x
	!Read the value into variable x
	
	IF (ABS(x) < TINY(x)) THEN
	!Initialise an IF statement to check if the denominator is 0
	
		s = 1
		!If x = 0 then we set sinc(x) = 1 as the function is defined such
		ELSE
		s = SIN(x)/x
		!Calculate the value of sinc(x) which is possible for x |= 0
	END IF
	!End the IF statement
	
	PRINT '(a25, e11.5)', 'The value of sinc(x) is: ', s
	!Print the value of sinc(x)
	
END PROGRAM prog2A
!End the program
