Recent content by physics724334

  1. P

    Comp Sci C++ Program Help (Newtons method)

    thanks that last reply helped me figure out what i was doing wrong I put the equation, x1= (x0+(y/x0))/2 outside of the loop and put x0 = x1 inside the loop along with x1= (x0+(y/x0))/2 and it worked x0 = (y/4); x1 = ((x0 + (y/x0))/2); while (!( x1 - x0 <= 0.0001 && x1 - x0...
  2. P

    Comp Sci C++ Program Help (Newtons method)

    the loop ends when x1 and x0 are equal, but i don't need them to be equal i need x1 to be equal to the root of the y value
  3. P

    Comp Sci C++ Program Help (Newtons method)

    phinds, I changed x0 == x1 to x0 = x1 instead This stopped the infinite loop, but it shows x1 and x0 as the same value.The loop still isn't updating x1 and x0. Is there something I'm missing, what's wrong with my source code.
  4. P

    Comp Sci C++ Program Help (Newtons method)

    I'm new to programming. my assignment wants me to create a program using c++ that can find the square root of any number using Newtons Method. The user has to enter a number (y) and the program has to calculate the root and has to show each iteration. the initial guess (x0) has to be y/4...
Back
Top