i write in javascript :3 random numbers i want that i can sum 3 number and receive sum of 100 how can i fix algorithm,problem that i can not receive sum of 100 (number1+number2+number3)=100: var number1=(Math.floor(Math.random() * 50) + 1); var number2=(Math.floor(Math.random() * 25) + 1); var number3= 100-(number1+number2); var num=new Array(number1,number2,number3);
Could you repeat the question in ENGLISH? It looks like what you are asking for is provided by that math, but your sentences aren't exactly clear on that. That said, stop saying VAR on every blasted line, you can comma delimit those.