Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:

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

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!
 
Share this answer
 
Comments
SajeeshCheviry 13-Jan-13 7:38am    
Good answer
WELL people here certainly dont do your homework...but to get you started,here is the problem broken,now go figure it out
1.get your birthday as input
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.
4.after this simply return the value,which will be your answer

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...
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900