-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path492_1.c
46 lines (46 loc) · 990 Bytes
/
492_1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include<cstdio>
#include<cctype>
int isvowel(char ch)
{
int flag =0;
if(ch=='a'|| ch=='A'||ch=='e'|| ch=='E'||ch=='i'|| ch=='I'||ch=='u'|| ch=='U'||ch=='o'|| ch=='O')
flag = 1;
return flag;
}
int main()
{
char ch,save;
int n;
//freopen ("in.txt","r",stdin);
while(1)
{
n=scanf("%c",&ch);
if(n!=1)
break;
if(isvowel(ch))
{
printf("%c",ch);
while(1){
scanf("%c",&ch);
if(!isalpha(ch))
break;
printf("%c",ch);
} printf("ay%c",ch);
}
else if(isalpha(ch))
{
save=ch;
while(1)
{
scanf("%c",&ch);
if(!isalpha(ch))
break;
printf("%c",ch);
}
printf("%cay%c",save,ch);
}
else
printf("%c",ch);
}
return 0;
}