Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You must design and write a program that take as in input, a proper name. You can safely assume (for this assignment) that a proper

image text in transcribed
You must design and write a program that take as in input, a proper name. You can safely assume (for this assignment) that a proper name will always consist of exactly three parts - a first name, a middle name, and a last name - separated by spaces. Your program must collect and store this full proper name in a string variable. Your program must then compute and store the following components in separate string variables: 1. total characters in the proper name (not including the spaces) 2. first name 3. middle name 4. last name 5. first initial (first letter of first name) 6. middle initial (first letter of middle name) 7. last name first (for example, for the proper name Bob Jones Smith, last name first would be Smith, Bob Jones) 8. short form (for example, for the proper name Bob Jones Smith, short form would be B. J. Smith) Finally, your program must output the required information. Here are some examples of what the user should see when the program runs. Example 1 Enter a proper name : Grace Murray Hopper Total characters 17 First name Grace Middle name Murray Last name Hopper First initial G Middle initial M Last name first : Hopper, Grace Murray Short form : G. M. Hopper Example 2 Enter a proper name : Alan Mathison Turing Total characters : 18 First name Alan Middle name Mathison Last name Turing First initial Middle initial : M Last name first Turing, Alan Mathison Short form : A. M. Turing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions