Answer:
see explaination
Step-by-step explanation:
Code below:
#include"letters.h"
int main()
{
while(1)
{
int input;
//Asks the user to enter 1 or 2 to see if the letter is a consonant
//of vowel.
printf("Enter 1 to check vowel or 2 for consonant:");
//scans inputted number
scanf("%i", &input);
//if the input is 1 then it will ask the user to enter the letter
//they want to test.
if(input == 1)
{
char c;
printf("Enter a character to test if it's a vowel:");
scanf(" %c",&c);
//if it is a vowel, then it will print that the letter is a vowel
if(is_vowel(c))
{
printf("%c is a vowel.\\", c);
}
//if not, then it will print that it isn't a vowel
else
{
printf("%c is not a vowel.\\", c);
}
}
//if the user inputs 2, then it will ask the user for the letter to test if
//it's a consonant or not.
else if(input == 2)
{
char c;
printf("Enter a character to test if it's a consonant:");
scanf(" %c",&c);
//if it is a consonant, then it will print that the letter is a consonant
if(is_h_consonant(c))
{
printf("%c is a consonant.\\", c);
}
//if not, then it will tell the user that it isn't a consonant
else{
printf("%c is not a consonant.\\", c);
}
}
else{
break;
}
}
return 0;
}
See attachment for sample output