Home > Back-end >  Zhengzhou university of light industry the 11th blue cup on-campus audition antithesis
Zhengzhou university of light industry the 11th blue cup on-campus audition antithesis

Time:06-03

Input a word, please output the word first appeared in vowels,
Including vowels a, e, I, o, u, a total of five,
Input format
Input line contains a word, containing only lowercase English letters in the word,
The output format
Output a line contains a letter, as the words of the first occurrence of elements of letters, if the word does not exist in the yuan
Letters, output n,
The sample input hello
Sample output
E
The sample input
Fly
Sample output
N
#include
#include
Int main ()
{
Char STR [100].
The scanf (" % s ", STR);
Int a=strlen (STR);
Int I, b=0;
for(i=0; i{
If (STR [I]=='a' | | STR [I]=='e' | | STR [I]=='I' | | STR [I]=='o' | | STR [I]=='u')
{
Printf (" % c \ n ", STR [I]);
B++;
break;
}

}
If (b==0)
{
Printf (" n \ n ");
}
return 0;
}

CodePudding user response:

This topic understanding the input string array and judge the length so that the number of control loop, and then appeared to jump out of the loop when the first vowel with break statement, but early know should end in the if statement,

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related