use of square root in code.

Discussion in 'Questions (Windows Mobile)' started by cdeane, Mar 15, 2009.

  1. cdeane

    cdeane Member

    Can you explane to me how to find the root to this ploblem?

    Code:
    textbox1.Text=((Textboxm.Text*144*Textboxy.Text)+(Textboxc.Text^2))/cPI
    Ex.

    M=.00185
    Y=6666.66
    C=4

    the root of 570.4 should come out to 23.8
     
    Last edited: Mar 15, 2009
  2. agraham

    agraham Expert Licensed User

    Code:
    textbox1.Text=(((Textboxm.Text*144*Textboxy.Text)+(Textboxc.Text^2))/cPI)^0.5
    The square root is the power of 1/2 = 0.5
     
  3. klaus

    klaus Expert Licensed User

    The square root function is Sqrt(x)
    Code:
    [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]textbox1.Text=[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Sqrt[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]((Textboxm.Text*[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]144[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]*Textboxy.Text+Textboxc.Text^[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]2[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])/[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]cPI[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT][/SIZE][/FONT]
    Best regards.
     
  4. cdeane

    cdeane Member

    Thanks agraham
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice