
Senior Member
Status: Offline
Posts: 54
Join Date: Nov 2011
Location: In ur base, movin ur stuffs

11042011, 05:38 PM
If you use the random number generator, it does generate a random number, but it includes decimal points. If you want to make it a bit easier on the user (I assume they're trying to guess the two numbers, or the product) have the random number be multiplied by 1. This prevents you from getting values such as 1.0 which Alice interprets as different from 1 (this caused some problems with my class, as we tried to tally up the number of randomly generated numbers 16 and we got 1.0's represented as a different value). Basically, put in the random number generator into the two places in your function that you need to create within your method, then multiply both random numbers by 1 to get 16 as opposed to 1.06.0 which Alice considers different numbers. (If Alice generated a 1.0 and the user guessed that the number was 1, Alice would consider them wrong, because of the fact that Alice does not understand that 1.0 and 1 are the same values)
Hope my paragraph helps! Powerhouse64 


Thread Tools  
Display Modes  

