摘要: #include <stdio.h>#include <stdlib.h> //使用递归实现n^k.int Func(int n, int k){ int mul = 1; if (k == 0){ return 1; } else if (k > 0){ for (int i = 1; i <= 阅读全文
posted @ 2020-04-01 15:05 听说在北郭 阅读(168) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <string.h>#define MAX 21 //要求 A:定义一个长度为 21 的字符数组,用于存放用户输入的文本;//要求 B:如果用户输 阅读全文
posted @ 2020-03-31 11:36 听说在北郭 阅读(370) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#define MAX 1024 //s1 > s2, 输出一个正数,值为不同两个字符之差 //s1 = s2, 输出0 // s1 < s2, 输出一个负数,值为 阅读全文
posted @ 2020-03-31 10:29 听说在北郭 阅读(1083) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> //用户输入生日,显示他在这个世界活了多少天int main(){ int year1, year2; int month1, month2; int day1, 阅读全文
posted @ 2020-03-30 17:14 听说在北郭 阅读(188) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main(){ int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; in 阅读全文
posted @ 2020-03-30 15:57 听说在北郭 阅读(539) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>//冒泡排序法void BubbleSort(int arr[], int size){ //从后往前排序,因此[0,bound)为已经排好的 //[bound, size) 为待排序的 //每次找最小值放到前面去,意味着已排 阅读全文
posted @ 2020-03-30 11:19 听说在北郭 阅读(320) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>//冒泡排序法void BubbleSort(int arr[], int size){ //从后往前排序,因此[0,bound)为已经排好的 //[bound, size) 为待排序的 //每次找最小值放到前面去,意味着已排 阅读全文
posted @ 2020-03-30 11:14 听说在北郭 阅读(126) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <time.h>#include <windows.h> void slashCard(int arr[]){ srand((unsigned int)time(NULL)); int pool[10] = 阅读全文
posted @ 2020-03-29 10:21 听说在北郭 阅读(1096) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> //输入花型int main(){ int n = 10; int i, j; for (i = 1; i < n; i++){ for (j = 1; j <= n - i; j++){ putchar(' '); //输 阅读全文
posted @ 2020-03-28 13:13 听说在北郭 阅读(183) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> int main(){ int n = 5; int i, j; for (i = 1; i <= n; i++){ for (j = 1; j <= i; j++){ printf(" %d * %d = %d",i, j 阅读全文
posted @ 2020-03-28 12:35 听说在北郭 阅读(846) 评论(0) 推荐(0)