Sam Lewis wrote:I am not sure how to start to get the 10 fractions ramdoly they can be between 1100000 but cannot equal 1,
Can we see this code? Please post.Sam Lewis wrote:...He has given us a code for the fraction class.,
Sam Lewis wrote:... get the 10 fractions ramdoly they can be between 1100000 but cannot equal 1,
Sam Lewis wrote:if they dont simplify then it skips thems.
Carey Brown wrote:
Sam Lewis wrote:... get the 10 fractions ramdoly they can be between 1100000 but cannot equal 1,
In other words, 2100000 (inclusive). So, how would you use Random#nextInt(N) to return that range?
Better but not correct. This range is 099999 (inclusive).
I hate signatures!
You mean the fraction must be less than 1, probably. As Piet says, you will have problems:Sam Lewis wrote:. . . it has to be less then 0
bacon. tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filleradvertising
