12,951,548 members (53,912 online)
Rate this:
See more:

write a program in c++ to calculate the remaining days of my birthday in current days
Posted 12-Jan-13 22:58pm
Pravinda Amarathunge 13-Jan-13 5:37am

Your question Totally doesn't make any sense : "Computer Science Department" !

Rate this:

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

Rate this:

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
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...
Rate this:

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.

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

Top Experts
Last 24hrsThis month
 OriginalGriff 660 CPallini 240 F-ES Sitecore 185 Maciej Los 170 RyanDev 155
 OriginalGriff 6,084 CHill60 3,480 Maciej Los 3,083 Jochen Arndt 1,975 ppolymorphe 1,830

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 14 Jan 2013