This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cant get odds to correctly caclulate

 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i always get 100% no matter what.
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it working. thanks you guys.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47278
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nathan gibson wrote:i got it working. thanks you guys.
Well done

How did you correct it?
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic