posted 21 years ago
For this u atleast need one referance point. So maybe take user input of the date and day (on which he is running the program) or else u can pick up the date and day from the Computer itself.Then using normal equations u can find out what day was on 01/10/2002 [for MBA preparation they deal with many such problems]. Now if 01/10 comes out to be a Sunday (eg.), for Wednesday u need to add 3 to it as 4/10/2002 will be the first wed and then keep on adding 7 to it till the time it reaches 31st.
Hope this helps
Rgds