当前位置:首页 > 哈工大 C语言程序设计精髓 MOOC慕课 6-12周编程题答案
if (t t=merged[i]; merged[i]=merged[k]; merged[k]=t; } } for (i=0;i printf(\ } return 0; }\11.3 \/* 题目内容:从键盘输入两个长度小于80的字符串A和B,且A的长度大于B的长度,编程判断B是不是A的子串,如果是,则输出”Yes”,否则输出”No”。这里所谓的该串的子串是指字符串中任意多个连续的字符组成的子序列。 函数原型:int IsSubString(char a[], char b[]) 函数功能:判断b是否是a的子串,是则返回1,否则返回0 程序运行结果示例1: Input the first string: Abcdefghijk123↙ Input the second string: 123↙ Yes 程序运行结果示例2: Input the first str: abefsfl↙ Input the second str: befs↙ Yes 程序运行结果示例3: Input the first str: aAbde↙ Input the second str: abc↙ No 输入第一个字符串的提示信息: \输入第二个字符串的提示信息: \输入单个字符的提示信息: \输入格式: 用 gets()函数 输出格式: 是子串,输出: \不是子串,输出: \*/ #include
共分享92篇相关文档