aspose file tools*
The moose likes Beginning Java and the fly likes cant get odds to correctly caclulate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "cant get odds to correctly caclulate" Watch "cant get odds to correctly caclulate" New topic
Author

cant get odds to correctly caclulate

nathan gibson
Ranch Hand

Joined: Sep 16, 2009
Posts: 120


what i am trying to do is calculate the odds by oddsOfWinning = 100 * (counterMatches / counterTimes); does anyone know why this isnt working?
nathan gibson
Ranch Hand

Joined: Sep 16, 2009
Posts: 120
i always get 100% no matter what.
nathan gibson
Ranch Hand

Joined: Sep 16, 2009
Posts: 120
i got it working. thanks you guys.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40034
    
  28
nathan gibson wrote:i got it working. thanks you guys.
Well done

How did you correct it?
nathan gibson
Ranch Hand

Joined: Sep 16, 2009
Posts: 120
i just avoided the problem, instead of using a variable in the print i just printed like + counterMatch + "/" counterTimes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cant get odds to correctly caclulate