Question: Write a program that prompts for the user to input a word. Then check the word to make sure the first character is an alphabetic
Write a program that prompts for the user to input a word. Then check the word to make sure the first character is an alphabetic letter and capitalized, and it contains atleast 8 characters. If it is not properly written, fix the word bybringingthe alphabetic letter to uppercase if it was lowercase, or replace it withA if its not an alphabetic letter. If the words containsless than 8 characters, adding !s to the endto make it 8 characters long. Use getchar()to read in the input. The user input ends with the userpressing the enter key (a new line character).
Example input/output:
Input: hello
Output: Hello!!!
Input: 3littlepigs
Output: Alittlepigs
we cannot use an array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
