pleae explain why i m not able to compare | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

pleae explain why i m not able to compare

i tried to compare str[i]=='i' so that i can find it is a vowel or not but it is not comparing it.my problem is to compare a string character and change them to their next alphabet (like a to b) and if they are vowel i have to change them to uppercase...now help me... here is my code... int size=strlen(str); for(int i=0;i<size;i++) { int flag=0; if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')flag=1; char str[i]++; if(flag==1)str[i]=toupper(str[i]); } all requied hearder files are added now help mee pls

26th Jun 2019, 10:24 AM
Karan singh majila
Karan singh majila - avatar
2 Respostas
+ 4
there is no flag = 1; in your code
26th Jun 2019, 10:32 AM
āœ³AsterisKāœ³
āœ³AsterisKāœ³ - avatar
+ 1
oh..my mistake...now it ia ok
26th Jun 2019, 10:33 AM
Karan singh majila
Karan singh majila - avatar