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...



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!



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here