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