摘要:
/* 将两个字符串连接起来,不使用strcat函数 */ #include <stdio.h> #include <stdlib.h> void strCat(char *pStr1,char *pStr2)//strcat(str1,str2)将str2的内容连接到str1后 { int str1 阅读全文
posted @ 2021-09-22 21:12
叶梓渔
阅读(2450)
评论(0)
推荐(0)
摘要:
/* 有一行电文,译码规律为: a ——> z b——> y c ——> x. 即把第一个字母变成第26个字母, 第i个字母变成第(26-i+1)个字母, 非字母字符不变 */ #include <stdio.h> #include <stdlib.h> void encode(char *pStr 阅读全文
posted @ 2021-09-22 21:10
叶梓渔
阅读(316)
评论(0)
推荐(0)
摘要:
/* 一篇文本共有3行文字,每行不多于5个字符, 要求分别统计处每行中的大写字母,小写字母, 数字,空格,以及其他字符的个数 */ #include <stdio.h> #include <stdlib.h> void countFunc(char *pWordArra,int wordArraLe 阅读全文
posted @ 2021-09-22 21:07
叶梓渔
阅读(145)
评论(0)
推荐(0)
摘要:
/*将三个字符串由小到大排序 */ #include <stdio.h> #include <stdlib.h> #include <string.h> void swapStr(char *pStrA,char *pStrB) { char temp[100]; strcpy(temp,pStrA 阅读全文
posted @ 2021-09-22 21:04
叶梓渔
阅读(462)
评论(0)
推荐(0)
摘要:
/*两个乒乓球队,甲队有a,b,c三名队员,乙队有d,e,f三名队员,甲队a不愿和d比赛,c不愿意和d,f比赛,求合适的赛手名单 */ #include <stdio.h> #include <stdlib.h> void getSchedule(char firstTeam[],char seco 阅读全文
posted @ 2021-09-22 21:01
叶梓渔
阅读(45)
评论(0)
推荐(0)
摘要:
//从键盘输入一个整数,判断该数是否为素数 //m不必要被2~m-1之间的每一个整数去除,只需要被2~根m间的任意整数整除即可。 #include<stdio.h> #include<math.h> int isPrime(int number) { if(number <= 1)//1既不是素数也 阅读全文
posted @ 2021-09-22 20:57
叶梓渔
阅读(1802)
评论(0)
推荐(0)

浙公网安备 33010602011771号