program main
IMPLICIT none
INTEGER :: a,b,c=0,i,J,D
PRINT *,"ENTER 2 NUMBERS"
read *,a,b
I=A
PRINT *,"PRIME NUMBERS ARE"
IF(A>B) THEN
D=A
A=b
B=D
ENDIF
I=A
DO WHILE(I<=B)
J=2
C=0
DO WHILE(J*J<=I)
IF(MOD(I,J)==0) C=1
J=J+1
ENDDO
IF(C==0) PRINT *,I
I=I+1
ENDDO
END program main
To embed this project on your website, copy the following code and paste it into your website's HTML: