how to write a if statement in fortran code example
Example 1: fortran if statement
if(condition)then
! do this if condition is true
endif
Example 2: fortrna if statement
if(conditional)then
! Do something
elseif(conditional)then
! Do something else
else
! Otherwise do this
endif