Link to home
Start Free TrialLog in
Avatar of Scott Fell
Scott FellFlag for United States of America

asked on

round robin team schedule

I have tried to convert this to classic asp vbscript http://www.devenezia.com/javascript/article.php/RoundRobin2.html and missing something.

Below is what I have an it not coming out like the sample data. I'm sure it is the math.

<%
response.Write("<br>")
response.write "<table  cellpadding=""10"">"
n=11
if n mod 2 <> 0 then
	oddteam= 1
	else
	oddteam =0
end if
for r = 1 to 8 'n
	response.write "<tr>"
	response.write "<td><b>"&r&"</b></td>"
	for i = 1 to (n)/2
		if i=1 then
			response.write "<td>1,"& (( n-1+r+1) mod (n-1)+2)  &"</td>"
			else
			response.write "<td>"& (( r + i + 2) mod (n-1)+2)  &","& ((n-1+r+1) mod (n-1) +2)  & "</td>"
		
		end if
	next
response.Write "</tr>"
next
response.write "</table>"
%>

Open in new window


I would prefer an asp version but would accept an ms sql optioin.
ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Scott Fell

ASKER

Thanks!  2nd eyes always seem to work.