Javascript - generate 3 random numbers that add to 100 and add them to 3 variables
Hi Guys,
I am creating an elearning module using Captivate and as part of that i have created a 'Who wants to be a millionaire' style set of lifelines.
I have 3 variables audience1, audience2 and audience3
I'm looking for some Javascript that will generate 3 numbers that add up to 100 and and them to 3 separate variables. e.g - audience1 = 20, audience2 = 50, audience3 = 30.
Has anyone created this style of game before? or can anyone point me in the right direction?
Thanks
