摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> #include<string.h> int main() { int arr[3][4] = { {1,2,3,4},{5,6,7,8},{9,10,11,12} }; int i = 0; i 阅读全文
posted @ 2022-03-31 09:14
zzy_C
阅读(42)
评论(0)
推荐(0)
|
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> #include<string.h> int main() { int arr[3][4] = { {1,2,3,4},{5,6,7,8},{9,10,11,12} }; int i = 0; i 阅读全文
posted @ 2022-03-31 09:14
zzy_C
阅读(42)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> //编写一个函数实现n的k次方,使用递归实现。 int Pow(int n, int k) { if (k == 0) return 1; if (k > 0) return n * Pow(n, 阅读全文
posted @ 2022-03-30 15:38
zzy_C
阅读(192)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> //计算一个数的每位之和(递归实现) int DigitSum(int n) { if(n>9) { return DigitSum(n / 10) + n % 10; } else { retu 阅读全文
posted @ 2022-03-30 14:19
zzy_C
阅读(83)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h>//字符串逆序 int my_strlen(char* str) { int count = 0; while (*str != '\0') { count++; str++; } return c 阅读全文
posted @ 2022-03-29 21:56
zzy_C
阅读(74)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> void print_table (int n) { int i = 0; for (i = 1; i <= n; i++) { //打印一行 int j = 0; for (j = 1; j < 阅读全文
posted @ 2022-03-29 17:27
zzy_C
阅读(70)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h>//采用递归求n的阶乘 int count = 0; //递归可以求解 但是效率太低 int Fib(int n) { //统计第三个斐波那契数的计算机次数 if (n == 3) count++; 阅读全文
posted @ 2022-03-29 16:11
zzy_C
阅读(56)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h>//采用递归求n的阶乘 int Fac(int n) { if (n <= 1) return 1; else return n * Fac(n - 1); } int main() { int n 阅读全文
posted @ 2022-03-29 15:42
zzy_C
阅读(178)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> int my_strlen(char* str) { if (*str != '\0') return 1 + my_strlen(str + 1); else return 0; } int m 阅读全文
posted @ 2022-03-29 15:04
zzy_C
阅读(53)
评论(0)
推荐(0)
摘要:
#define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> int Fun (int n) { if (n == 5) return 2; else return 2 * Fun(n + 1); } int main() { printf("%d\n", 阅读全文
posted @ 2022-03-29 14:37
zzy_C
阅读(739)
评论(0)
推荐(0)
|