I’m trying to randomly generate two integers that add up to a previously selected integer.
For instance, if I have a previously selected value of 12, I need a method that could generate [6,6], or [11,1], etc.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Edit: see this answer
Just for fun (I’m sure it’s not 100% for negatives etc…) :