Question: Write a program which asks the user to enter their first name and then display each character of their name on a separate line. If
Write a program which asks the user to enter their first name and then display each character of their name on a separate line.
If no name is entered, inform the user accordingly.
If the name is valid then use a for loop to display the character number and each character of their name on a separate line. A valid name is one which contains only alphabetic characters excluding any possible name separators such as a space or a
At the end, display the number of alphabetic letters entered.
Enter 'ermintrude", get
E
r
m
i
n
t
r
u
d
e
but if enter no value for the user's first name, display 'You did not enter any characters.
if enter 'Ermntrude" for the first name, display 'Non alphabetic characters were entered.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
