Write a function named NEWDAY which accepts three reference parameters for month, day and year. NEWDAY increments the date represented by month, day and year. For example, 11, 30 and 2003 would be incremented to 12 1 and 2003. NEWDAY does not display the date. Also write a main program which inputs a date (month, day and year) from the keyboard and calls NEWDAY in a loop in order to display the next ten dates following the input date. The main program handles all input and output. Sample program output: Enter month: 11 Enter day: 25 Enter year: 2003 The next ten dates are: 11 26 2003 ... ... 12 5 2003 Note that leap years are generally those divisible by 4, but not if they are divisible by 100 unless they are also devisible by 400. testing your program across both month and year boundaries. Hand in the program listing, sample program output. |
|
|
I DO NOT want someone to type up this program and give it to me. I simply want a push in the right direction and guidance towards the write setup. |
|
|
int dm[]={31,28,31,/*...*/};
|
|
|
|
|
|
30 - declaration of 'int day[]' shadows a parameter 31 -declaration of 'int month[]' shadows a parameter |