You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you need to create a C++ program which reads in a Social Security number, a first name, a middle name or initial, and a last name from the file inData.dat. The name is written to file outData.dat in three different formats: Format 1: First name, middle name, last name, and Social Security number Format 2: Last name, first name, middle name, and Social Security number Format 3: Last name, first name, middle initial, and Social Security number Format 4: Last name, middle initial, last name Note: The social security number and name in three parts on file “inData.dat”, each separated by one or more whitespaces characters: 222-33-3543 Robert James Williams Output: Write data in file “outData.dat” with proper format: Robert James Williams 222-33-3543 Williams, Robert, James 222-33-3543 Williams, Robert, J. 222-33-3543 Robert J. Williams
You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you need to create a C++ program which reads in a Social Security number, a first name, a middle name or initial, and a last name from the file inData.dat. The name is written to file outData.dat in three different formats: Format 1: First name, middle name, last name, and Social Security number Format 2: Last name, first name, middle name, and Social Security number Format 3: Last name, first name, middle initial, and Social Security number Format 4: Last name, middle initial, last name Note: The social security number and name in three parts on file “inData.dat”, each separated by one or more whitespaces characters: 222-33-3543 Robert James Williams Output: Write data in file “outData.dat” with proper format: Robert James Williams 222-33-3543 Williams, Robert, James 222-33-3543 Williams, Robert, J. 222-33-3543 Robert J. Williams
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
Related questions
Question
You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you need to create a C++ program which reads in a Social Security number, a first name, a middle name or initial, and a last name from the file inData.dat. The name is written to file outData.dat in three different formats:
Format 1: First name, middle name, last name, and Social Security number
Format 2: Last name, first name, middle name, and Social Security number
Format 3: Last name, first name, middle initial, and Social Security number
Format 4: Last name, middle initial, last name
Note: The social security number and name in three parts on file “inData.dat”, each separated by one or more whitespaces characters:
222-33-3543 Robert James Williams
Output: Write data in file “outData.dat” with proper format:
Robert James Williams 222-33-3543
Williams, Robert, James 222-33-3543
Williams, Robert, J. 222-33-3543
Robert J. Williams
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning