The text files boynames2011.txt and girlnames2011.txt , contain a list of the 1,
ID: 3532588 • Letter: T
Question
The text files boynames2011.txt and girlnames2011.txt, contain a list of the 1,000 most popular boy and girl names in the United States for the year 2011 as compiled by the Social Security Administration.
These are blank-delimited files where the most popular name is listed first, the second most popular name is listed second, and so on, to the 1,000th most popular name, which is listed last. Each line consists of the first name followed by a one or more blank spaces and then the number of registered births using that name in the year. For example the girlnames2011.txt file begins with:
This indicates that Sophia was the most popular name with 21,695 registered namings, Isabella was the second most popular with 19,745, and Emma was the third most popular with 18,674.
Write a program (name the main program mp09a) that reads both the girl's and boy's files into memory using arrays. Then, allow the user to input a name. The program should search through both arrays. If there is a match, then it should output the popularity ranking and the number of namings. The program should also indicate if there is no match. Be sure to include the boynames2011.txt and girlnames2011.txt with the appropriate path so that you program may be exercised.
For example, if the user enters the name "Justice," then the program should output:
If the user enters the name "Walter," then the program should output:
my sample code as txt file here (along with current errors): https://www.dropbox.com/s/dis4ktqve3siksr/ C++ NEED TO FIND NAME IN A TEXT FILE?m
List of boys names: https://www.dropbox.com/s/wc5yogzabf97gju/boynames.txt?m
List of girls names: https://www.dropbox.com/s/f7h5elc2igtyccf/girlnames.txt?m
Explanation / Answer
when do you need this by?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.