Skip to main content

INTDIV1.F95

	PROGRAM INTDIV1
!
!  Purpose: To demonstrate integer division using Fortran
!
	IMPLICIT NONE
	INTEGER:: I,J	! Used for holding two integers
	REAL:: X	! Used for holding result of division
!
	WRITE(*,*)'Enter an integer'
	READ(*,*)I
	WRITE(*,*)'Enter a second integer'
	READ(*,*)J
	X=I/J
	WRITE(*,*)'The ratio of these two integers is ',X
	STOP
	END PROGRAM INTDIV1