<RECURSIVE Example Program>
Program recursive_example Print *, ifactorial(5) End Program Recursive Integer Function ifactorial( i ) Result( res ) If (i<2) Then res = 1 Else res = i* End If End Function
■ Execution Results
120
Program recursive_example Print *, ifactorial(5) End Program Recursive Integer Function ifactorial( i ) Result( res ) If (i<2) Then res = 1 Else res = i* End If End Function
120