#include "stdstuff.h" #include "Date.h" int main () { Date currentDate, birthDate, profsBirthdate (3, 2, 1961); char dayNames [][10] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; cout << "Please enter the current date (dd mm yyyy): "; currentDate.read(cin); for (;;) { cout << "\nEnter your birth date (dd mm yyyy, junk to terminate): "; birthDate.read (cin); if (cin.fail()) { pause(); return 0; } cout << "You are " << currentDate.daysAfter(birthDate) << " days old.\n" << "You were born on a " << dayNames[birthDate.dayInWeek() - 1] << ".\n"; if (birthDate.compareTo(profsBirthdate) < 0) { cout << "You are older than the prof!!!\n"; } } }