Solved

# JavaScript to figure percentage

Posted on 2014-11-06

I have 4 Labels.

Label1 will always have a value of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10 though this value will ultimately represent a percent.

Label2 will always have a whole number value (0-infinity).

Label3 is also always going to be a whole number, and should be a result of the value of label2 times the value of .1, .02, .03, .04, .05, .06, .07, .08, or .09 (and always rounded up when needed. Basically I'm trying to figure out a percentage.

Label4 is just the value of Label3 + the value of Label2

For example:

Label1 = 4

Label2 = 60

Label3 should equal "3" (60 * .04 = 2.4...rounded up is 3)

Label4 should be 63 (Label2 is 60 + Label3 which is 3 = 63)

Any mathletes out there wanna give it a shot?

TIA