#include <stdio.h>
int main()
{
int count = 1;
int a = 0;
int b = 0;
scanf("%d", &a);
for (b = 1; b <= a; b++)
{
count = b * count;
}
printf("%d", count);
return 0;
}
C语言循环方式求n的阶乘
最新推荐文章于 2025-03-11 19:32:41 发布
#include <stdio.h>
int main()
{
int count = 1;
int a = 0;
int b = 0;
scanf("%d", &a);
for (b = 1; b <= a; b++)
{
count = b * count;
}
printf("%d", count);
return 0;
}
1588
1万+
2986
4万+

被折叠的 条评论
为什么被折叠?