Calculate Factorial
題目說明
請輸入一整數N,並輸出該數的階乘 若輸入的整數小於0輸出"wrong!"並且終止程式
※階乘規則: 1x2x3x...xn
輸入限制: 數字
輸入
整數N
輸出
N的階乘
sample input1
5
sample output1
120
sample input2
-8
sample output2
wrong!
請輸入一整數N,並輸出該數的階乘 若輸入的整數小於0輸出"wrong!"並且終止程式
※階乘規則: 1x2x3x...xn
整數N
N的階乘
5
120
-8
wrong!
Comments