Hi guys, currently I have 3 groups of user which is A, B and C.

A will handle tasks for first week,
B will handle tasks for second week,
C will handle tasks for third week,

C will handle tasks for 4th week,
A will handle tasks for 5th week,
B will handle tasks for 6th week,

B will handle tasks for 7th week,
C will handle tasks for 8th week,
A will handle tasks for 9th week,

then A will handle tasks for 10th week, B and C will be continue like sequence above.

Week-> 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 .....
Group-> A | B | C | C | A | B | B | C | A | A | B | C | C | A | B ......

Any algorithm can determine current week is belong to A / B / C group?

For example: week 53th is belong to A ? B or C group?

Thank you.

Recommended Answers

All 4 Replies

floor(53 / 9) returns 5 entire blocks. The remainder is 8 (53 - 45) so C will handle that one.

Can I have a sudo code for that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.