Verify factorial base case: 0! = 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_003(id, nfail) use forcolormap_utils, only: factorial integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "factorial: 0! = 1" logical :: ok ok = (factorial(0) == 1) call report_test(name, ok, id, nfail) end subroutine test_003