Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Code: Make a program that reads a list of birthdays from a file called birthdays.txt (please make sure this name is exact). You will

C++ Code:

Make a program that reads a list of birthdays from a file called birthdays.txt (please make sure this name is exact). You will then ask the user to input a date and you are required to find: (1) who has the next birthday, (2) how many days away that birthday is from the input date and (3) how old the person will be on that birthday.

(Note: you DO need to take into account leap year (see example 3)).

The format of birthdays.txt will be:

name_put_together_with_underscores : mm/dd/yyyy

You may assume there is at least one birthday in birthdays.txt. You may also assume the date entered is valid. You do not need to check if the file opened correctly.

birthdays.txt:

Nick_Florin : 11/7/2000 David_Woodhouse : 8/12/1990 Michael_Smith : 11/13/1949 Mary_Rasmussen : 1/13/1987 Martin_Hughes : 3/13/1976 Melanie_Mouzon : 5/15/1933 Christine_Bonin : 2/10/1945 William_Holland : 6/13/1999 Doyle_Dye : 6/14/2014 Steve_Burkey_Frazier : 3/13/1972 Nell_Granberry : 4/25/1979 Madeleine_Daniel : 7/9/1968 Lillie_Callender : 6/16/1930 Shoshana_Falls : 5/27/1959 

Example 1:

Current date? 1/1/2040 Next birthday: Mary_Rasmussen in 12 days will turn 81

Example 2:

Current date?

2/20/2017

Next birthday:

Martin_Hughes

in 21 days

will turn 58

Example 3:

Current date?

2/20/2016

Next birthday:

Martin_Hughes

in 22 days

will turn 57

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

What is the schedule for this project?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago