Question: C++ Write a program that reads in a series of names from a file The file is called numbers.txt. It uses a loop to read
C++

Write a program that reads in a series of names from a file The file is called numbers.txt. It uses a loop to read in each number from the file and store each number in an array called numbers. The program should then call two functions. The first function: The function is named formatSSN It take in a string variable by reference It alters the string to be a properly formatted social security number, in the format XXX-XXX-XXXX This function must use the substring function. It returns nothing. The second function: The function is named print It takes in an array of strings and an integer for the size of the array. It prints out the array using a for loop to the console It returns nothing The program will use a loop to call the formatSSN function on each of the strings in the numbers array. Once all of the strings are converted to a formatted social security number, call the print function to display each of the capitalized names. Copy and paste the starter code below into a new file called social.cpp/* Name * Section info */#include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
