Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Help with math.

  1. #1
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts

    Help with math.

    I have these variables:
    totalVotes = 56
    totalOptions = 3
    currentVotes = 17

    I want to find out how many precent is "currentVotes" from "totalVotes".
    I know it's kinda basic but I forgot.
    thanks.

  • #2
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think it's 30 percent but I'm not sure...
    i kinda forgot too... maybe i did my math wrong. oh well o.k. bye

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,016
    Thanks
    203
    Thanked 2,538 Times in 2,516 Posts
    percentage = (currentVotes/totalVotes) * 100 // (result is 30.35714)
    Last edited by Philip M; 01-02-2008 at 07:50 PM.

  • #4
    Regular Coder
    Join Date
    Oct 2007
    Posts
    277
    Thanks
    2
    Thanked 4 Times in 4 Posts
    I kinda figured it out my self but thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •