Initial commit: C language learning code

This commit is contained in:
2025-07-20 16:30:56 +08:00
commit 06e24173a6
139 changed files with 9303 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <stdbool.h>
int jiecheng(int n);
int main()
{
int n;
printf("请输入一个整数:");
scanf("%d", &n);
printf("%d\n", jiecheng(n));
return 0;
}
int jiecheng(int n)
{
int sum = 1;
if (n == 1)
return sum;
else
sum = n * jiecheng(n-1);
}