int main()
{
int a = 0;
int n = 0;
int b = 1;
scanf("%d", &n);
for (a = 1; a <= n; a++)
{
b = b * a;
printf("%d\n", b);
}
return 0;
}
求n的阶乘
原创
©著作权归作者所有:来自51CTO博客作者柱生Tzhu的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
题目:求n的阶乘
求n阶乘的大致思路
i++ 初始化 跳出循环 -
用for循环求n的阶乘Java 用for循环求n的阶乘求和
for循环求n个数阶乘的和
i++ #include