Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cant get odds to correctly caclulate

 
nathan gibson
Ranch Hand
Posts: 120
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i always get 100% no matter what.
 
nathan gibson
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it working. thanks you guys.
 
Campbell Ritchie
Sheriff
Posts: 48642
56
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic