13720 - EE2310_Lab_10_2   

Description

Write a C++ program that asks the user to input today's date and his/her birthday. Your program simply outputs them according to some format, then it checks whether they are equal. If they are, output "Happy birthday\n".

The main function is given. All you need to do is implementing the output member function. Here is a template of your code.

//--------------------------------------------

#include <iostream>
using namespace std;

class DayOfYear{
public:
  void output(); //member func. prototype
  int month;
  int day;
};

void DayOfYear::output(){
 /*

 *  Your work here

*/
}

 

 

 

Input

10/14
10/14
 

Output

Today is Oct 14
Your birthday is Oct 14
Happy birthday!

 

Sample Input  Download

Sample Output  Download

Partial Judge Code

13720.cpp

Partial Judge Header

13720.h

Tags




Discuss