Integer comparison: Difference between revisions

m
Line 204:
end
 
In ANSI FORTRAN 77 andor later you couldcan use relational operators and structured IF statements:
program compare
integer a, b
Line 213:
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
Line 219:
end
 
In ISO FORTRAN 90 andor later you couldcan use symbolic relational operators (<, >, ==, etc.)
program compare
integer :: a, b
read(*,*) a, b
Line 228:
else if (a == b) then
write(*, *) a, ' is equal to ', b
else if (a > b) then
write(*, *) a, ' is greater than ', b
end if
end program compare
 
=={{header|Haskell}}==
Anonymous user