#include <stdio.h>
#define N 100
void stryuanyincpy(char[],char[]);
int main(int argc,char *argv[])
{
char ch1[N],ch2[N];
printf("please input string:");
gets(ch2);
stryuanyincpy(ch1,ch2);
printf("the result:\n");
puts(ch1);
system("pause");
return 0;
}
void stryuanyincpy(char dest[],char src[])
{
int i,j = 0;
char c;
for (i = 0; i < strlen(src); i++)
{
c = src[i];
switch (c)
{
case 'a':
case 'A':
case 'e':
case 'E':
case 'i':
case 'I':
case 'o':
case 'O':
case 'u':
case 'U':
dest[j++] = c;
break;
default:
break;
}
}
dest[j] = '\0';
}
|