test factorial with input 8 output 40320