- Code: Select all
The code is removed after ac.
Moderator: Board moderators
The code is removed after ac.
DELETED AFTER AC :-)
for(i=0;i<=strlen(str);i++)
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
#define SI 1000009
char line[SI];
int main()
{
long i,j,k,len;
while(gets(line))
{
len=strlen(line);
for(i=0;i<len;i++)
{
if(toupper(line[i])>='A' && toupper(line[i])<='Z')
{
if(toupper(line[i])=='A'||toupper(line[i])=='E'||toupper(line[i])=='I'||toupper(line[i])=='O'||toupper(line[i])=='U')
{
while(line[i]!=' ' && i<len)
{
if(toupper(line[i])>='A' && toupper(line[i])<='Z')
{
printf("%c",line[i]);
}
else
{
break;
}
i++;
}
printf("%s%c","ay",line[i]);
}
else
{
j=i;
while(line[++i]!=' ' && i<len)
{
if(toupper(line[i])>='A' && toupper(line[i])<='Z')
printf("%c",line[i]);
else
{
break;
}
}
printf("%c%s%c",line[j],"ay",line[i]);
}
}
else
printf("%c",line[i]);
}
printf("\n");
}
return 0;
}
#include<stdio.h>
#include<ctype.h>
char input[1000000];
char temp[1000000];
int main()
{
while(gets(input)!=NULL)
{
int i=0;
while(input[i]!='\0')
{
int x=0;
while(isalpha(input[i]))
{
temp[x]=input[i];
x++;
i++;
}
int y;
if(temp[0]=='a'||temp[0]=='e'||temp[0]=='i'||temp[0]=='o'||temp[0]=='u'||temp[0]=='A'||temp[0]=='E'||temp[0]=='I'||temp[0]=='O'||temp[0]=='U')
{
for(y=0;y<x;y++)
printf("%c",temp[y]);
printf("ay");
}
else if(isalpha(temp[0]))
{
for(y=1;y<x;y++)
printf("%c",temp[y]);
printf("%cay",temp[0]);
}
printf("%c",input[i]);
i++;
temp[0]='\0';
}
printf("\n");
int k=0;
while(input[k]!='\0')
{
input[k]='\0';
k++;
}
}
return 0;
}#include<stdio.h>
#include<string.h>
#include<ctype.h>
int main()
{
char s[300000],t[300000];
char temp;
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
while(gets(s))
{
long i,len;
len = strlen(s);
//printf("%d",len);
for(i = 0;i<len;)
{
if(isalpha(s[i]))
{
if((s[i]!='a')&&(s[i]!='e')&&(s[i]!='i')&&(s[i]!='o')&&(s[i]!='u')&&
(s[i]!='A')&&(s[i]!='E')&&(s[i]!='I')&&(s[i]!='O')&&(s[i]!='U'))
{
temp = s[i++];
}
while(isalpha(s[i]))
printf("%c",s[i++]);
t[0] = temp;
t[1] = '\0';
strcat(t,"ay");
printf("%s",t);
temp = '\0';
}
if(!isalpha(s[i]))
{
//flag = 0;
printf("%c",s[i++]);
}
}
printf("\n");
}
return 0;
}
george3456 wrote:don't know why getting RTE..... help plzzzzzzzzzzz
Users browsing this forum: No registered users and 1 guest