Answered You can hire a professional tutor to get the answer.
You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number.
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 nameNote: 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
#include<iostream>#include<fstream>using namespace std;int main(){ char fn[50],mn[50],ln[50],ssn[15];ifstream in;ofstream out;in.open("inData.dat");...