![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c
※ 唯 ①
这个作者很懒,什么都没留下…
展开
-
复制字符串中的元音字母
《算法笔记》7.7 复制字符串中的元音字母一、题目描述写一个函数,将一个字符串中的元音字母复制到另一个字符串中。在主函数中输入一个字符串,通过调用该函数,得到一个有该字符串中的元音字母组成的一个字符串,并输出。二、代码代码如下(示例):#include "stdio.h"#include "string.h"using namespace std;void vowels(char s1[], char s2[]){ int j = 0; for (int i = 0; s1[i] .原创 2021-03-28 16:56:21 · 1382 阅读 · 0 评论 -
算法题目字符串比较
《算法笔记》比较两个字符串s1和s2的大小,如果s1>s2,则输出一个正数;若s1=s2,则输出0;若s1<s2,则输出一个负数。#include "stdafx.h"#include "stdio.h"#include "string.h"using namespace std;int main(){ char s1[50], s2[50]; gets_s(s1); gets_s(s2); if (strcmp(s1, s2) == 0) { printf("0")原创 2021-03-27 11:28:03 · 260 阅读 · 0 评论