(C PROGRAMMING ONLY) 4. Breaking the Code by CodeChum Admin ATTENTION SOLDIER! This will be the hardest mission of your life. Our intelligence department has caught the enemy sending codes from one base to another. These enemy codes can either be a simple communication message or a mastermind plan. Our intelligence department has determined that a mastermind plan is a code that has at least 1 consonant character. Since you know programming, your task is to check a code if it is a mastermind plan or not. Instructions: In the code editor, you are provided with a main() function that asks the user for a code. Furthermore, there is a call to the function, hasConsonant(). Your task is to declare and define this hasConsonant() function which has the following details: Return type - int Name - hasConsonant Parameter: char* - to hold the character array Return value - 1 if there is at least 1 consonant and 0 if there is none. Be sure to consider both the capital and small letter consonants when checking. Input 1. The code Output Enter the code: AeiaaABIAOU ALERT! There is a consonant in the code!
(C
4. Breaking the Code
by CodeChum Admin
ATTENTION SOLDIER!
This will be the hardest mission of your life. Our intelligence department has caught the enemy sending codes from one base to another. These enemy codes can either be a simple communication message or a mastermind plan.
Our intelligence department has determined that a mastermind plan is a code that has at least 1 consonant character.
Since you know programming, your task is to check a code if it is a mastermind plan or not.
Instructions:
In the code editor, you are provided with a main() function that asks the user for a code. Furthermore, there is a call to the function, hasConsonant().
Your task is to declare and define this hasConsonant() function which has the following details:
Return type - int
Name - hasConsonant
Parameter:
char* - to hold the character array
Return value - 1 if there is at least 1 consonant and 0 if there is none. Be sure to consider both the capital and small letter consonants when checking.
Input
1. The code
Output
Enter the code: AeiaaABIAOU
ALERT! There is a consonant in the code!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images