Results 1 to 3 of 3

Thread: Hey PD

  1. #1
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,023

    Default Hey PD

    why won't this calculate more then 3 decimal places? I need to use it for my math homework, but it wants 4 decimal places for an answer and eventually I am going to need 5

    #include <iostream>
    #include <cstdlib>
    #include <ctime>
    #include <stdio.h>
    #include <math.h>
    using namespace std;

    int main()
    {
    long double num=14;
    num = num - ((num-8*sqrt (num+3))/(1-(4/(sqrt (num+3)))));
    cout << num << endl;
    return(0);
    }

  2. #2
    Registered Users Regular Rayne's Avatar
    Join Date
    Mar 2009
    Posts
    8,561

    Default

    why are you using c++ instead of a calculator

  3. #3
    princeso Kirby's Avatar
    Join Date
    Mar 2009
    Posts
    19,023

    Default

    I figured it out sort of

    I had to find convergence

Posting Permissions

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