上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: #include <stdio.h> #include <malloc.h> #include <stdbool.h> #include <stdlib.h> typedef struct node //定义节点类型 { int data; struct node* pNext; }*PNODE, 阅读全文
posted @ 2020-06-03 03:35 abel2020 阅读(92) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 #include <malloc.h> typedef struct node { struct node* pNext; int data; }*PNOD 阅读全文
posted @ 2020-06-03 01:27 abel2020 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdbool.h> #include <stdlib.h> //exit 函数需要 typedef struct arr { char* arr_name; int len; //当前数组长度 int maxlen; }*PARR,ARR; 阅读全文
posted @ 2020-05-31 23:32 abel2020 阅读(180) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdbool.h> #include <string.h> struct arr //定义结构体类型 { char* arr_name; int len; int maxlen; }; main() { struct arr array1 阅读全文
posted @ 2020-05-31 18:30 abel2020 阅读(1167) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> void fun(int** q); void fun2(int** q); main() { int* p; //把p的二级指针传给fun fun(&p); printf("%d", *p); //动态分配内存 fun2(&p); } // void fun( 阅读全文
posted @ 2020-05-31 15:25 abel2020 阅读(121) 评论(0) 推荐(0) 编辑
摘要: /*结构体基本练习 */ #include <stdio.h> #include<stdbool.h> #define MALE 0 //男 0 #define FEMALE 1 //女 1 #define MAXNAME 30 //名字数组最多字符数 #define MAXFR 10 //结构体数 阅读全文
posted @ 2020-05-31 04:36 abel2020 阅读(191) 评论(0) 推荐(0) 编辑
摘要: /* 该程序练习二维数组 用户输入3组数,每组5个, (3行5列数组) 计算每组平均值 计算每行平均值 计算所有数的平均值 找出所有数的最大值 可以使用如下数组测试 a[3][5] = {{11,12,13,14,15}, {21,22,23,24,15}, {31,32,33,34,35}}; 想 阅读全文
posted @ 2020-05-28 20:27 abel2020 阅读(120) 评论(0) 推荐(0) 编辑
摘要: //数组倒叙排列 #include<stdio.h> #define SIZE 5 void dao(int*, int size); main() { int a[SIZE]; int i; for (i = 0;i < SIZE;i++) { scanf_s("%d", &a[i]); } da 阅读全文
posted @ 2020-05-28 00:16 abel2020 阅读(112) 评论(0) 推荐(0) 编辑
摘要: // #include <stdio.h> int get_input(void); int fac(int); int fac2(int); main() { int input; int ans; int ans2; printf("This progame calculates factori 阅读全文
posted @ 2020-05-27 15:18 abel2020 阅读(238) 评论(0) 推荐(0) 编辑
摘要: // 计算a 和b 之间整数的平方和 // 模块化,主程序做流程控制,1个计算函数,1个输入合法函数,1个范围检测函数 #include <stdio.h> #include<stdbool.h> double sum_square(long a, long b); bool bad_limit(l 阅读全文
posted @ 2020-05-27 11:27 abel2020 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页