You are tasked to create a program on C++ that will enable the user to input first name, middle initial, and last name all in upper cases. with a 22-character limit that also includes spaces in between the names on the ID card. The following limitations should be included in the program: 1.) If the first name, second name, middle initial, and last name exceed the character limit, use the first name initial and last name. 2.) If the last name’s character count is greater than or equal to the character limit, omit the second name and middle initial. Use the first name initial and truncate the last name to fit the character limit. 3.) The spaces in between the first name, second name, middle initial, and last name should not be included in the input. 4.) If there is no second name or middle initial, input 0.
Please answer:
You are tasked to create a program on C++ that will enable the user to input first name, middle initial, and last name all in upper cases. with a 22-character limit that also includes spaces in between the names on the ID card. The following limitations should be included in the program:
1.) If the first name, second name, middle initial, and last name exceed the character limit, use the first name initial and last name.
2.) If the last name’s character count is greater than or equal to the character limit, omit the second name and middle initial. Use the first name initial and truncate the last name to fit the character limit.
3.) The spaces in between the first name, second name, middle initial, and last name should not be included in the input.
4.) If there is no second name or middle initial, input 0.
OUTOUT PROGRAM SHOULD BE:
Type First Name:
Type Second Name:
Type Middle Name:
Type Last Name:
Result:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images