- 博客(4)
- 收藏
- 关注
原创 奖学金发放---c语言
#include <stdio.h>typedef struct winners{ char name[20]; int finalScore; int classScore; char work; char west; int paper; int scholarship;} WIN;int main(){ printf("Input n:"); int n,i,j,k; WIN a[10]; s...
2022-05-29 18:30:19
1563
1
原创 统计重复字符
输入一串字符(字符数小于80),以回车表示输入结束,编程计算并输出这串字符中连续重复次数最多的字符和重复次数。如果重复次数最多的字符有两个,则输出最后出现的那一个。程序运行结果示例1:Input a string:2344455555↙5:5程序运行结果示例2:Input a string:sgf222257↙2:4#include <stdio.h>#include <string.h>int main(){ char s1[80]
2022-05-22 16:06:21
195
原创 查找字符子串
#include <stdio.h>#include <string.h>int main(){ char s1[80],s2[10]; printf("Input a string:"); gets(s1); printf("Input another string:"); gets(s2); int m=strlen(s2); int a[10],i,j,k,o; for(i=0;s1[i]!=0;i++) { i.
2022-05-22 15:48:30
77
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人