Search:

Type: Posts; User: wallysworld

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    4,231

    okay, thanks swoopy... i changed the 1 to n as...

    okay, thanks swoopy...

    i changed the 1 to n as you suggested, and you're right, i don't want int arithmetic... would you specify double by...



    (double)*pi_value += (4.0/((n*2)-1));


    ?
  2. Replies
    13
    Views
    4,231

    sorry, i wasn't clear, i meant i edited it in my...

    sorry, i wasn't clear, i meant i edited it in my previous post, but here it is again



    #include<stdio.h>

    void pi(int n, double *pi_value, int *iterations); //declare function

    int main...
  3. Replies
    13
    Views
    4,231

    sorry salem, the "glaring" syntax errors were...

    sorry salem, the "glaring" syntax errors were typos when i was typing that in, glance at it again if you don't mind and see if you catch anything now, i also edited the values of iterations and...
  4. Replies
    13
    Views
    4,231

    so here is what i've come up with... it seems to...

    so here is what i've come up with...
    it seems to me like it should execute correctly, but somewhere something is causing my output to be bogus large numbers; however, it will compile... does anyone...
  5. Replies
    13
    Views
    4,231

    "N" is the value of the denominator that i'm...

    "N" is the value of the denominator that i'm continuing to, its input by the user.

    i think i've got the for loop now, i guess the only think i'm still confused on is exactly how to incorporate...
  6. Replies
    13
    Views
    4,231

    PI Equation in C

    hi,

    i'm currently working on a program which asks the user to input an integer value of "n" to determine the number of iterations of the denominator in the equation for PI listed below.

    I have...
Results 1 to 6 of 6