4.3) Example Of Making Decisions
As a first step, we will just test and print if a
is greater than b
.
1 program example7 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 endif 9 end program example7
Example of a program with an if statement
making a decision. See lines 6 to 8 for the decision making if statement
.