Question

Programming Challenge: 25 - Student Line Up Using Files The program should prompt the user for the file name and read the data from the file. A suitable file of names

(List of Random Names) is provided on Moodle. Note that these names might include spaces; handle your input accordingly. The expected output is two names; do not show the entire file (or you will regret that code when you do the associated programming quiz that processes thousands of names). Do not use arrays or sorting for this problem! Deliverables: Program file (PC5-25.cpp) and screen shot (using the RandomNames.txt file) for this Programming Challenge. Trivia: The list of names was created by a C++ program! The two input files were a list of a couple hundred common baby names, and a list of common family names; the output file was the result of random selections from each input file. You will write programs like this in the "advanced" programming classes.

Fig: 1