C++ PROGRAMMING

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ PROGRAMMING

Post by answerhappygod »

C++ PROGRAMMING
C Programming 1
C Programming 1 (136.76 KiB) Viewed 14 times
Question 3 (10) Write a program to help new parents find a name for their baby. The file BabyNames.dat contains a list of the most popular names for boys and girls, ranked according to their popularity. The user should be able to choose whether to look for boys' names or girls' names and to specify which letter of the alphabet the names should begin with. E.g. I may want to look for girls' names starting with an 'E'. Your program should copy the names that satisfy the user's criteria (girls' names starting with an 'E' in my example) to another file and include the ranking allocated to the name. E.g. if BabyNames.dat contains the following data showing that James is the most popular boys' name and Ellen the most popular girls' name, with Michael and Nazeera in the 10th place: 1 James Ellen. Peter Eleanor 3 Rodger Mary 4 John Elise 5 Mpho Anne 6 Molefe Ella 7 Zaheer Petunia. 8 Charles Eugenie 9 Tabang Charlotte 10 Michael Nazeera The output file should look as follows, showing all the names starting with an 'E' and their rank: 1 Ellen. 2 Eleanor 4 Elise 6 Ella 8 Eugenie NB: First plan your program on paper (using your computational thinking to do so). You have to submit your plan for your program as well as the actual program code, input and output. Planning your program can take the form of a flowchart, pseudocode, or notes to guide you in the development of the program. 1
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply