摘要: 输入 10个员工工号和姓名,以工号增加方式排序(姓名跟随改变),按工号查找(同时找出姓名) 代码如下: 1 # include<stdio.h> 2 # include<string.h> 3 char num[10][7]; 4 char name[10][10]; 5 char temp[10] 阅读全文
posted @ 2020-03-09 20:25 kakusan 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 1 // 统计一个字符串中单词个数和最长单词的位置以及最长单词的字母数,只考虑句子单词之间用空格分开的情况下 2 # include<stdio.h> 3 # include<string.h> 4 char c[100]; 5 struct S{ 6 int c1,c2,index; 阅读全文
posted @ 2020-03-09 15:30 kakusan 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 代码如下: 1 //二次函数求解 2 # include<stdio.h> 3 # include<math.h> 4 float a,b,c; 5 struct d{ 6 double x1; 7 double x2; 8 }; 9 d R; 10 d func1(float,float,floa 阅读全文
posted @ 2020-03-09 12:58 kakusan 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 用辗转相处法求最大公约数 最小公倍数为两数的乘积除以两数的最小公倍数 代码如下: 1 //最大公约数和最小公倍数 2 # include<stdio.h> 3 int a,b; 4 int main() 5 { 6 scanf("%d%d",&a,&b); 7 int yue(int,int); 8 阅读全文
posted @ 2020-03-09 12:27 kakusan 阅读(164) 评论(0) 推荐(0) 编辑