## else/if statements help

assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter 7/3/12
code displays todays date....displays "payday" entered......adds 7 days to "payday" to show NEXT payday.

1.void Date::addDays(int month, int day, int year)
2.{
3. _day = _day + 7;
4.
5. if(_day > 30)
6. {
7. _day = _day - 30;
8. _month = _month + 1;
9. }
10. else
11. {
12. cout << _month;
13. cout << "/";
14. cout << _day;
15. cout << "/";
16. cout << _year;
17.
18. }
19.
20. if(_month>12)
21. {
22. _month = _month - 12;
23. cout << _month;
24. cout << "/";
25. cout << _day;
26. _year = _year + 1;
27. cout << "/";
28. cout << _year;
29. }
30. else
31. {
32. cout << _month;
33. cout << "/";
34. cout << _day;
35. cout << "/";
36. cout << _year;
37. }
38.
39.}

OUTPUT:

1.When is pay day?
2.MONTH: 7
3.DAY: 3
4.YEAR: 12
5.
6.Today's date is: 11/1/127.
8.The date of payday is: 7/3/12
9.
10.Next's week's payday is: 7/10/127/10/12
11.
12.Press any key to continue . . .

OUTPUT:

1.When is pay day?
2.MONTH: 12
3.DAY: 29
4.YEAR: 12
5.
6.Today's date is: 11/1/12
7.
8.The date of payday is: 12/29/12
9.
10.Next's week's payday is: 1/6/13
11.
12.Press any key to continue . . .

OUTPUT:

**

1.When is pay day?
2.MONTH: 11
3.DAY: 29
4.YEAR: 12
5.
6.Today's date is: 11/1/12
7.
8.The date of payday is: 11/29/12
9.
10.Next's week's payday is: 12/6/12
11.
12.Press any key to continue . . .