RosettaCodeData/Task/Integer-comparison/Fortran/integer-comparison-3.f

14 lines
237 B
Fortran

program compare
integer a, b
read(*,*) a, b
if (a .lt. b) then
write(*, *) a, ' is less than ', b
else if (a .eq. b) then
write(*, *) a, ' is equal to ', b
else if (a .gt. b) then
write(*, *) a, ' is greater than ', b
end if
end