Home > Back-end >  vowels
vowels

Time:12-31

# include "stdio.h"
Void ycopy (char [x], int n)
{

Char [20] y;
Int I, j;
//gets (x);
For (I=0, j=0; iIf (x [I]=='a' | | x [I]=='a') {
Y=x [j] [I]; }
Else if (x [I]=='e' | | x [I]=='e') {
Y=x [j] [I]; }
Else if (x==[I] 'I' | | x [I]=='I') {
Y=x [j] [I]; }
Else if (x==[I] 'o' | | x [I]=='o') {
Y=x [j] [I]; }
Else if (x==[I] 'u' | | x [I]=='u') {
Y=x [j] [I]; }

}
Printf (" % s ", y);
}
Void main () {

Char a [20]="asdfeiou";
Ycopy (a, 20);





}

CodePudding user response:

Modified as follows, for your reference:
 # include "stdio.h" 
Void ycopy (char [x], int n)
{

Char [26] y={0};
Int I, j;
//gets (x);
For (I=j=0; iIf (x [I]=='a' | | x [I]=='a'
| | x [I]=='e' | | x [I]=='e'
| | x [I]=='I' | | x [I]=='I'
| | x [I]=='o' | | x [I]=='o'
| | x [I]=='u' | | x [I]=='u')
{
Y=x [j++] [I];
}
//else if (x [I]=='e' | | x [I]=='e')
//{
//y=x [j] [I];
//}
//else if (x==[I] 'I' | | x [I]=='I')
//{
//y=x [j] [I];
//}
//else if (x==[I] 'o' | | x [I]=='o')
//{
//y=x [j] [I];
//}
//else if (x==[I] 'u' | | x [I]=='u')
//{
//y=x [j] [I];
//}

}
Y [j]='\ 0';
Printf (" % s ", y);
}

Int main ()//void main ()
{

Char a [20]="asdfeiou";
Ycopy (a, 20);

return 0;
}