Sunday

March 29, 2015

March 29, 2015

Posted by **hafsa** on Tuesday, March 20, 2012 at 4:03am.

- c++ programming -
**MathMate**, Tuesday, March 20, 2012 at 8:11amYou'll need to first determine if the year is a leap year by the rules given above:

int isLeap(int year){

int leap=0;

if(year divisible by 4)leap=1;

if(year divisible by 100)leap=0;

if(year divisible by 400)leap=1;

return leap;

}

Then make an array of cumulative number of days of the previous month, example:

int cndpm(int n){

// n=month, 1=january, ...12 = december

int count[12];

count[0]=0;

count[1]=31;

count[2]=59; // 60 for leap year

...

}

So for March, cndpm(2) will return the total number of days before March 1st.

I'll let you think about the rest, and post if you need further help.

- c++ programming -
**No.**, Tuesday, April 2, 2013 at 2:50pmLOL I ARE SO COOL

**Answer this Question**

**Related Questions**

Logic - Draw a flowchart for a program that reads a date in an 8-digit sequence...

Finance - On January 1, 2011 you bought a two-year U.S. government bond with a ...

java programming - Your boss at Ruritania Weather Center (RWC) has asked you to ...

accounting - I have figured this out I just want to make sure I am correct in my...

programming - Temp Employer wants a program that will allow the company’s clerk ...

c++ programming - Solve the following problem. Apply all the steps i.e ...

Finance - It's January 1, 2011. Company XYZ wants to build a teddy bear factory...

computer programming - Mr. Dacara owns 20 apartment buildings. Each building ...

Statistics - Each day a local radio station randomly draws a date (without ...

Algebra 2 - Question is about Step Functions:(between" " are all floor functions...