Results 1 to 2 of 2
Thread: Percentages
- 12-09-2010, 03:54 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 1
- Rep Power
- 0
Percentages
Hi, I am working with java in my computer class. My assignment was to finish a game, and for extra credit i need to add rats. These rats have to eat a random percent of 1%-10% of grain(food). The food is a random number each year. :confused:I don't know how generate that random percent:confused:. Also the percent also has to be random each time it is called. If anyone can provide any information, that would be much appreciated.
- 12-09-2010, 05:14 AM #2
Senior Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 580
- Rep Power
- 4
What have you tried so far?
This might help you:
Random (Java 2 Platform SE v1.4.2)
Java Practices -> Generate random numbers
Similar Threads
-
using percentages?
By shroomiin in forum New To JavaReplies: 3Last Post: 09-30-2009, 01:58 AM -
[SOLVED] Noobie - Calculating Percentages
By fullmetaljacket in forum New To JavaReplies: 16Last Post: 05-22-2009, 01:10 AM -
Percentages
By Ciwan in forum New To JavaReplies: 3Last Post: 02-16-2009, 05:34 AM -
Qadratic Formula and Percentages
By bbtgirl in forum JCreatorReplies: 4Last Post: 02-07-2009, 03:07 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks