摘要: //自定义strcpy函数 # include<stdio.h> char c[50]={0}; char b[50]={0}; void strcpy1(char *a,char *b); int main() { gets(c); gets(b); strcpy1(c,b); puts(c); 阅读全文
posted @ 2020-03-06 23:37 kakusan 阅读(465) 评论(0) 推荐(0) 编辑
摘要: //比较字符串,输出首个不同字符的差值 # include<stdio.h> char c[50]={0}; char b[50]={0}; int strcmp1(char *a,char *b); int main() { gets(c); gets(b); printf("%d\n",strc 阅读全文
posted @ 2020-03-06 23:16 kakusan 阅读(578) 评论(0) 推荐(0) 编辑
摘要: //不用strcat函数连接字符串 # include<stdio.h> char c[50]={0}; char b[15]={0}; void strcat1(char *a,char *b); int main() { gets(c); gets(b); strcat1(c,b); puts( 阅读全文
posted @ 2020-03-06 22:48 kakusan 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 密码转换原则 26个字母里面,第i个字母的米码为第26-i+1个字母 //密码问题 第i个大写或者小写字母的密码为第26-i+1个对应字母 # include<stdio.h> char c[150]; char m[150]={0}; int main() { gets(c); for(int i 阅读全文
posted @ 2020-03-06 22:19 kakusan 阅读(268) 评论(0) 推荐(0) 编辑
摘要: # include<stdio.h> char c[3][81]; int upp,low,sp,num,oth; int main() { upp=low=sp=num=oth=0; printf("请输入:\n"); for(int i=0;i<3;i++) gets(c[i]); printf 阅读全文
posted @ 2020-03-06 18:25 kakusan 阅读(182) 评论(0) 推荐(0) 编辑
摘要: //找二维数组鞍点 # include<stdio.h> float a[10][10]; int maxrow[10]; int mincol[10]; int n; int main() { printf("请输入n:"); scanf("%d",&n); printf("请输入%d阶矩阵:", 阅读全文
posted @ 2020-03-06 17:15 kakusan 阅读(727) 评论(0) 推荐(0) 编辑
摘要: //折半查找 # include<stdio.h> int a[15]; int n; int f=0,r=14; int main() { printf("请输入数组:"); for(int i =0;i<15;i++) scanf("%d",&a[i]); printf("请输入n:"); sc 阅读全文
posted @ 2020-03-06 14:04 kakusan 阅读(104) 评论(0) 推荐(0) 编辑