# -*- conding:utf-8 -*- def jieChen(n): if n ==1: return 1 else: return n * jieChen(n-1) def main(): n = int(input("请输入一个正整数: ")) x = jieChen(n) print("%d 的阶乘为:%d" %(n,x)) main()
# -*- conding:utf-8 -*- def jieChen(n): if n ==1: return 1 else: return n * jieChen(n-1) def main(): n = int(input("请输入一个正整数: ")) x = jieChen(n) print("%d 的阶乘为:%d" %(n,x)) main()