Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the
Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the following way: John Jacob Schmidt Jane Marry Roe The program should take each name from the file into a string and display each part of the name together with its length separately to screen in the following format Schmidt, John J. First name John (4) Middle name Jacob (5) Last name: Schmidt (7) Roe, Jane M. First name: Jane (4) Middle name Marry (5) Last name: Roe (3) For the first line of the file, you should read John Jacob, and Schmidt into three string variables. His full name, Schmidt, John J should be stored in another string variable for output As there are unknown numbers of names/lines, you need to choose appreciated loop statement in this program. Please be noted that the middle is the initial with a dot in output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started