Need Help With Calendar Coding

SO my Professor Sent us an email with very specific instructions. There is a lot so im going to try and summarize it. Using 7 functions I am supposed to make a code that will tell you what day number you enter according to leap years also.
So 1/1/2015 would output Is day number 1 of the year 2015. I am going to include the website and 7 steps. I have no idea how to begin this If anyone could help lead me through it in any way that would be magnificent. Thank you so much.

1. A function that returns a boolean value indicating whether or not the day entered is
between 1 and 31.
2. A function that returns a boolean value indicating whether or not the month entered is
between 1 and 12.
3. A function that returns a boolean value indicating whether or not the year entered is
greater than 0 and less than or equal to current year.
4. A function that returns a boolean value indicating whether or not the year entered is a leap
year.
5. A function that returns an integer value indicating the number of days in a month.
6. A function that returns a string value indicating the name of the month.
7. A function that returns an integer value indicating actual number of day that is equivalent
to day, month, and year that is entered.

http://www.husaingholoom.com/files/1428/C++ProgramAssignment-7.pdf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #include <iostream>

using namespace std;

int main()
{
    int month;      // The input for what month it is
    int day;        // The input for what day it is
    int year;       // The input for what year it is
    cout << "This C++ Program prints the day number of the year,"
         << " given the date\nin the form of month, then day, then year"
         << endl;
    cout << "Enter date in the form : month day year : \n\nEnter Month  :";
    cin  >> month;
    cout << "Enter Day : ";
    cin  >>  day;
    cout << "Enter Year  : ";
    cin  >> year;
    return 0;
}
So, it's already broken down nicely into 7 tasks. Try and tackle the first task. Can you write a function that returns a boolean value? Can you write a check that an integer has value between 1 and 31?
Topic archived. No new replies allowed.