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

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
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,...
icon
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
ADT and Class
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning