I am currently writing a c++ program for my college homework, and I am almost done but here is the problem:
Part of this problem is adding days of the week and coming up with the correct answer, such as adding 13 days to Wednesday has to output Tuesday, but if the number added has a range, I would be fine, but the thing is is that you should be able to put anything in and arrive at the answer.
I need help coming up with a formula that I can use.
I assigned numbers to the days so I can use it mathematically.
Sunday is 0,
Monday is 1,
and so forth.
So basically, I need to find a formula that will give me one constant answer depending on what day of the week it is.
I know this is hard to explain.
What I need is a formula using the days the person entered (such as 14, 22, 2, etc) and the day assigned to the current day (0-6) to give me a range of 7 answers using the 7 days.
Programmers probably have a better idea of what I am talking about than anyone.
2007-06-06
18:50:58
·
4 answers
·
asked by
Anonymous
in
Mathematics