program exf5 ! exf5.f90 if, then, else conditional statements double precision :: x = 2.0 integer :: i = 3 print *, "exf5.f90 if, then, else" if( x < 3.0 ) then ! < > <= >= == != compare operations print *, "compare < > <= >= == != x=", x end if if( x > 3.0 .or. i == 3 .and. i > 2 ) then print *, "logic .or. , .and. , .not. i=", i end if if( x > 3.0 ) then print *, "x > 3.0" else if( x > 2.5 ) then print *, "x > 2.5" else print *, "x <= 3.0" end if end program exf5