The program must accept two lower case alphabets A and B as the input. The program must print Yes as the output if both the alphabets are either vowels or consonants. Else the program must print No as the output.
Example Input/Output 1:
Input:
a m
Output:
No
int main(){
char a,b;
scanf("%c %c,&a,&b);
if( ( (a=='a'||a=='e'||a=='i'||a=='o'||a=='u')&&(b=='a'||b=='e'||b=='i'||b=='o'||b=='u') ) || ( (a!='a'&&a!='e'&&a!='i'&&a!='o'&&a!='u')&&(b!='a'&&b!='e'&&b!='i'&&b!='o'&&b!='u') ) )
{
pritnf("Yes");
}
else{
printf("No");
}
}
No comments:
Post a Comment