n=int(input("请输入一个整数n"))b=1for i in range(1,n+1): b=1*iprint("n的阶乘为",b)
6
请输入一个整数nn的阶乘为 6
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!