Skip to main content

4.10) Decisions With More Freedom To Test


1      program example9
2      real :: a
3      real :: b
4      a=10.0
5      b=5.0
6      if ( a > b ) then
7          print *, ‘a is greater than b’
8      else if ( a > 4.0 ) then
9          print *, 'a is greater than 4.0'
10     else
11         print *, ‘increase the value of a’
12     endif
13     end program example9