Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago