program main
implicit none
integer :: a, b, c
print*, "Enter Two positive integers"
read*, a, b
if (a < b) then
c = a
a = b
b = c
end if
do
c = MOD(a, b)
IF (c == 0) EXIT
a = b
b = c
end do
print*, "The HCF is ", b
end program main
To embed this project on your website, copy the following code and paste it into your website's HTML: