PROGRAM prog1B
!Initialise the program and give it a name

	IMPLICIT NONE
	!Assume nothing about the variables used in this program
	REAL :: l, g, pi, T, f
	!Declare variables for length, gravitational field strength, pi, period and frequency respectively
	
	pi = 4.0*ATAN(1.0)
	!Calculate the value of pi using the implicit function for arctan and put it into the variable, pi
	
	PRINT*, pi
	
	PRINT*, 'What is the length of the pendulum in metres?'
	!Prompt the user to input the length of the pendulum
	READ*, l
	!Read the value into the variable l
	
	PRINT*, 'What is the gravitational field strength, g, in Newtons per kilogram?'
	!Prompt the user to input the g.f.s.
	READ*, g
	!Read the value into the variable g
	
	T = 2*pi*SQRT(l/g)
	!Calculate the period of oscillation of the pendulum
	PRINT*, 'The period of natural oscillation of the pendulum is: ', T, ' seconds'
	!Print out the period
	
	f = 1/T
	!Calculate the frequency of oscillation
	PRINT*, 'The natural frequency of oscillation of the pendulum is: ', f, ' Hz'
	!Print out the frequency
	
END PROGRAM prog1B
!End the program
