#include #include #include "My_date.h" using namespace std; void main() { Date today,b,nb; int i; cout << "What date is today?\n"; today.get_a_date(); cout << "Today is " << today.s_day() << ", " << today.s_month() << " " << today.date() << ", " << today.year() << "." << endl << endl; cout << "What is the date of your birth?\n"; b.get_a_date(); cout << "You were born on " << b.s_day() << ", " << b.s_month() << " " << b.date() << ", " << b.year() << "." << endl << endl; nb.set_a_date(b.date(),b.month(), today.year()); if (nb.difference(today) < 0) nb.set_a_date(b.date(),b.month(), today.year()+1); cout << "Your next birthday is " << nb.s_day() << ", " << nb.s_month() << " " << nb.date() << ", " << nb.year() << "." << endl; cout << nb.difference(today) << " more days!!" << endl; cout << "You will be " << nb.year() - b.year() << " years old." << endl << endl; cout << "\n\n Bye!!\n\n"; }