15,921,454 members
See more:

write a program in c++ to calculate the remaining days of my birthday in current days
Posted
Captain Price 13-Jan-13 5:37am
Your question Totally doesn't make any sense : "Computer Science Department" !

Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

SajeeshCheviry 13-Jan-13 7:38am

Solution 2

WELL people here certainly dont do your homework...but to get you started,here is the problem broken,now go figure it out
2.taking the above input,calculate the date as numbered day of year eg like 205 th day of year...
3.then check,using above number and current numbered day(i.e today's date convereted to numbered day of year) whether you have passed your birthday date or it is yet to appear.

Well i'm helping you cause some time back even i was afraid of coding,but let me be clear,HANDS ON makes you perfect so code...:D

I hope other guys wont be angry on me for helping him with his homework...

Solution 3

There are just two tricky details in you task, namely
1. Wrap around.
2. Leap years.

For simplicity, let's suppose that neither wrap around nor leap year case is happening then, with just an array (days per month) and simple operations you may easily find the result.