2019/1/23复制元音字母
题目描述
写一函数,将两个字符串中的元音字母复制到另一个字符串,然后输出。
输入
一行字符串
输出
顺序输出其中的元音字母(aeiuo)
样例输入
abcde
样例输出
ae
#include<stdio.h>
#include<string.h>
int yy(char a[],char b[])
{
int i,j;
gets(a);
for(i=0,j=0;i<strlen(a);i++)
{
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u')
b[j++]=a[i];
}
puts(b);
return 0;
}
int main()
{
char a[100],b[100];
yy(a,b);
return 0;
}