Hi everyone, I need your help to write this C++ function. Every month corresponds to a number. I need the function to return the value for the month.

For example, user input month as MM (i.e. aug is 08)

jan returns 0, feb 3, mar returns 3 and so on.

how do I do this?

This is what I've got so far:

Function Prototype:

int monthValue(int month)

//returns a certain value for every month

Function Definition:

int monthValue(month, year)

{

}

What should I do in the function definition/body?

Here is the full list of values

int jan(0), , feb(3), mar(3), apr(6), may(1), jun(4), jul(6), aug(2), sep(5), oct(0), nov(3), dec(5);

For example, user input month as MM (i.e. aug is 08)

jan returns 0, feb 3, mar returns 3 and so on.

how do I do this?

This is what I've got so far:

Function Prototype:

int monthValue(int month)

//returns a certain value for every month

Function Definition:

int monthValue(month, year)

{

}

What should I do in the function definition/body?

Here is the full list of values

int jan(0), , feb(3), mar(3), apr(6), may(1), jun(4), jul(6), aug(2), sep(5), oct(0), nov(3), dec(5);