3 Replies Latest reply on Jun 10, 2011 5:23 PM by pauland

    Math problem

    david567890

      Hi

       

      I am trying to divide a variable by 1 to get a number, but everything I have tried doesnt seem to work. Here is the code:

       

                      var a:Number=Number (R_P1.text)
                      var b:Number=Number (R_P2.text)
                      var c:Number=Number (R_P3.text)
                      var d:Number=Number (R_P4.text)
                      var e:Number=Number (R_P5.text)
                      var f:Number=Number (R_P6.text)
                      var g:Number=Number (R_P7.text)
                      var h:Number=Number (R_P8.text)
                      var i:Number=Number (R_P9.text)
                      var j:Number=Number (R_P10.text)
                     
                      var k:Number = (1/a)+(1/b)+(1/c)+(1/d)+(1/e)+(1/f)+(1/g)+(1/h)+(1/h)+(1/j)
                         
                      TotalR_P.text = String (k)

       

       

      Thanks for the help!!

       

      David