Yet another simple question.
- To: mathgroup at smc.vnet.net
- Subject: [mg47148] Yet another simple question.
- From: gtsavdar at auth.gr (George)
- Date: Sat, 27 Mar 2004 01:35:14 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
As i'm new to this amazing world of Mathematica, i'm not able yet to
do
simple things that for an experienced user seem ridiculous.
So i want to ask a simple question. If:
+++++++++++++++++++++++++++++++++++++++++++++++
y,m,day : integer positive variables
yr,mr : integer positive variables which depend on y and m
fff[day_] = Mod[day + 2*mr + Quotient[3*(mr + 1), 5] + yr + 2 +
Quotient[yr, 4] + Quotient[yr, 400] - Quotient[yr, 100], 7];
+++++++++++++++++++++++++++++++++++++++++++++++
Now for a specific day=D i want to find the value of the integer
variable Q which belongs to (D,D+7], so fff[Q]=1 would be true.
So i write:
Do[Q = Which[fff[x] == 1, x], {x, D + 1, D + 7, 1}]
and i expect Q to take the appropriate value. But this doesn't work.
Can anyone show me the way to the light?
Thank you.