ok tomk here you go, i have 4 answers for you and the script.
#!/bin/bash
function result {
y=0;z=0;q=0;r=0
y=$(($teamAmen+$teamBmen+$teamAmixed+$teamBmixed));z=$(($teamAwomen+$teamBwomen))
q=$(($teamAmixed+$teamBmixed+$teamAwomen+$teamBwomen));r=$(($teamAmen+$teamBmen))
echo "Flingers :- men won $teamAmen games, women won $teamAwomen games, men against women won $teamAmixed."
echo "total games won = 51. Number of men on team = $y Number of women on team = $z."
echo "———————————————————————————————————"
echo "Patties :- men won $teamBmen games, women won $teamBwomen games, women against men won $teamBmixed."
echo "total games won = 49. Number of men on team = $r Number of women on team = $q."
echo
echo "============================================================"
echo
}
#======================
function firstloop {
for two in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23;do
teamBwomen=$(($two*2));teamAwomen=$(($two))
secondloop
done
}
#======================
function secondloop {
count=1;a=0;b=0;x=0
until [ $count -gt 51 ];do
x=$(($x+1))
teamBmixed=$x;teamAmixed=$((2*$x))
a=$(($teamAmen+$teamAwomen+$teamAmixed));b=$(($teamBmen+$teamBwomen+$teamBmixed))
if [[ $a -eq 51 && $b -eq 49 ]];then result
else count=$(($teamAmen+$teamAwomen+$teamAmixed));fi
done
}
#=====================
teamAmen=0;teamAwomen=0;teamAmixed=0
teamBmen=0;teamBwomen=0;teamBmixed=0
for one in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16;do
teamBmen=$((2*$one));teamAmen=$((3*$one))
firstloop
done
echo "finished"
answers
mainpc@mainpc:~> sh "new bash script"
Flingers :- men won 6 games, women won 15 games, men against women won 30.
total games won = 51. Number of men on team = 55 Number of women on team = 45.
———————————————————————————————————
Patties :- men won 4 games, women won 30 games, women against men won 15.
total games won = 49. Number of men on team = 10 Number of women on team = 90.
===================================================================
Flingers :- men won 15 games, women won 14 games, men against women won 22.
total games won = 51. Number of men on team = 58 Number of women on team = 42.
———————————————————————————————————
Patties :- men won 10 games, women won 28 games, women against men won 11.
total games won = 49. Number of men on team = 25 Number of women on team = 75.
===================================================================
Flingers :- men won 24 games, women won 13 games, men against women won 14.
total games won = 51. Number of men on team = 61 Number of women on team = 39.
———————————————————————————————————
Patties :- men won 16 games, women won 26 games, women against men won 7.
total games won = 49. Number of men on team = 40 Number of women on team = 60.
===================================================================
Flingers :- men won 33 games, women won 12 games, men against women won 6.
total games won = 51. Number of men on team = 64 Number of women on team = 36.
———————————————————————————————————
Patties :- men won 22 games, women won 24 games, women against men won 3.
total games won = 49. Number of men on team = 55 Number of women on team = 45.
=================================================================
finished
just copy the script into a text file and save it, i named mine "new bash script".
then to run it just type in a console
sh "new bash script"
not very elegant or efficient but it got the job done.

took me longer to get the script working than it would probably have taken me to work it out on paper, couldn't remember any of the syntax and rules so had to keep looking at the last script i wrote to try and figure things out.
so anyway the 4 answers are.. the number of men on the flingers team are - 55 or 58 or 61 or 64.
i believe if my logic was correct all those answers fulfill the criteria.
