摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文
posted @ 2019-12-25 17:09 空破 阅读(99) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 5; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文
posted @ 2019-12-19 13:16 空破 阅读(105) 评论(1) 推荐(0)
摘要: /* 假定输入的字符串中只包含字母和*号。 编写函数,实现: 除了字符串前导和尾部的*号之外,将串中其他*号全部删除。 在编写函数时,不得使用C语言提供的字符串函数。 例如,若字符串中的内容为****A*BC*DEF*G******* 删除后,字符串中的内容则应当是****ABCDEFG****** 阅读全文
posted @ 2019-12-16 13:39 空破 阅读(116) 评论(0) 推荐(0)
摘要: /* 假定输入的字符串中只包含字母和*号。 编写函数,实现: 除了字符串前导和尾部的*号之外,将串中其他*号全部删除。 在编写函数时,不得使用C语言提供的字符串函数。 例如,若字符串中的内容为****A*BC*DEF*G******* 删除后,字符串中的内容则应当是****ABCDEFG****** 阅读全文
posted @ 2019-12-16 13:23 空破 阅读(132) 评论(0) 推荐(0)
摘要: //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n, 阅读全文
posted @ 2019-11-30 23:33 空破 阅读(123) 评论(1) 推荐(0)
摘要: // 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, r 阅读全文
posted @ 2019-11-18 23:33 空破 阅读(90) 评论(0) 推荐(0)
摘要: line11 line14改变了数据的宽度 line12 line13 line15改变了数据的精度 阅读全文
posted @ 2019-11-04 22:16 空破 阅读(123) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { printf("201983270493"); return 0; } #include<stdio.h> int main() { printf("hello,火星"); return 0; } #include<stdio.h> int product (int,int); int main (void) { int x,y,s; 阅读全文
posted @ 2019-10-20 21:31 空破 阅读(150) 评论(0) 推荐(0)