PROGRAM prog4A
!Initialise the program and give it a name

	IMPLICIT NONE
	!Assume nothing about the variables used within this program
	REAL, DIMENSION(3) :: vcross, v1, v2
	!Declare a 3D vector in which we will store the result of the cross product and vectors v1, v2
	REAL :: dot
	!Declare a real variable for the result of the dot product

	PRINT*, 'Enter the x, y and z components of vector 1:'
	!Prompt the user to input their first vector
	READ*, v1(1), v1(2), v1(3)
	!Read the three values into their respective components in v1
	PRINT*, 'v1 = ', v1
	!Print v1 for verification

	PRINT*, 'Enter the x, y and z components od vector 2:'
	!Prompt the user to input their second vector
	READ*, v2(1), v2(2), v2(3)
	!Read the three values into their respective components in v2
	PRINT*, 'v2 = ', v2
	!Print v2 for verification

	dot = DOT_PRODUCT(v1,v2)
	!Use the intrinsic dot product function to calculate v1.v2

	vcross(1) = v1(2)*v2(3) - v1(3)*v2(2)
	vcross(2) = v1(3)*v2(1) - v1(1)*v2(3)
	vcross(3) = v1(1)*v2(2) - v1(2)*v2(1)
	!Calculate the v1xv2 and store the components in their respective components in vcross

	PRINT*, 'The scalar product, v1.v2 = ', dot
	!Print the result of v1.v2
	PRINT*, 'The vector product, v1xv2 = ', vcross
	!Print the result of v1xv2

END PROGRAM prog4A
!End the program
