Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   How to make a random number generator based off an equation. (http://www.go4expert.com/forums/random-generator-based-equation-t21848/)

 luettke10 20Apr2010 20:54

How to make a random number generator based off an equation.

I need a program that will allow the user to input two numbers in the range of 1 to 120. The program would then take the two numbers and subtract the larger number from the smaller number. The number they equals would represent x in the equation .84x which would equal the % of the lower number then appearing. The percentage of the other number coming up would be 100% minus the percentage of the higher number coming up.

 virxen 21Apr2010 03:07

Re: How to make a random number generator based off an equation.

it would be better if you give 2 arithmetic examples.

 luettke10 21Apr2010 03:53

Re: How to make a random number generator based off an equation.

So say the first number they enter is "n" and the second is "x", its not possible to do % of "n" showing up equals .84(n-x) and then using the remaining percent for the second number x.

 All times are GMT +5.5. The time now is 11:26.