Shalini likes doing things differently. Every time she texts her closest friends, the words she uses in
her sentences follow a strange pattern. All she does is reverses the order of all the vowels contained
in the word she's texting. For example, SHALINI becomes SHILINA. You're her new assistant. Help her
write her messages!
Sample Input:
ENIGMA
Sample Output:
ANIGME
Answers
Answered by
0
Answer:
Anigme
Explanation:
thanks .......
Answered by
0
Answer:
#include<stdio.h>
#include<string.h>
int main()
{
char a[10],b[10],temp;
int i,k=0,c[10],j;
scanf("%s",a);
for(i=0;a[i]!='\0';i++)
{
if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
{
b[k]=a[i];
c[k]=i;
k++;
}
}
b[k]='\0';
i=0;j=strlen(b)-1;
while(i<j)
{
temp=b[i];
b[i]=b[j];
b[j]=temp;
i++;
j--;
}
for(i=0;i<strlen(a);i++)
{
for(j=0;j<k;j++){
if(i==c[j])
{
a[i]=b[j];
}
}
}
printf("%s",a);
return 0;
}
Explanation:
Similar questions