Search:

Type: Posts; User: JDD

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,463

    getchar();

    getchar();
  2. Replies
    59
    Views
    4,954

    Well im obviously not smart enough to fix this >.

    Well im obviously not smart enough to fix this >.<
  3. Replies
    59
    Views
    4,954

    #include #include int...

    #include <stdio.h>
    #include <math.h>

    int main(void)

    {

    double r, a, p, x, powr, n;
  4. Replies
    59
    Views
    4,954

    No, as far as i can tell everything should...

    No, as far as i can tell everything should compile fine...
  5. Replies
    59
    Views
    4,954

    Are you sure you #include 'd.

    Are you sure you



    #include <math.h>
    'd.
  6. Replies
    59
    Views
    4,954

    powr = pow((double)x , (double)n); Try that...

    powr = pow((double)x , (double)n);


    Try that ;x
  7. Replies
    59
    Views
    4,954

    #include #include int...

    #include <stdio.h>
    #include <math.h>

    int main(void)
    {

    double r, a, p, x, powr, n;
  8. Replies
    59
    Views
    4,954

    p = (r * powr ) / ( powr - 1 ); Simple...

    p = (r * powr ) / ( powr - 1 );


    Simple mistake ;x
  9. Replies
    59
    Views
    4,954

    Oh but of course, and my code = a lot of what...

    Oh but of course, and my code = a lot of what i've shown you so far... don't worry.

    Edit:



    #include <stdio.h>
    #include <math.h>

    int main(void)
  10. Replies
    59
    Views
    4,954

    Alright, what im gonna do is write the program...

    Alright, what im gonna do is write the program myself, how i would do it, post it, and you can compare, because that confused me ;x
  11. Replies
    59
    Views
    4,954

    Apologies, there was something wrong in the code...

    Apologies, there was something wrong in the code i posted



    #include <stdio.h>
    #include <math.h>

    int main(void) // good habit, i dont think your teacher would mind.
    {
  12. Replies
    59
    Views
    4,954

    USE CODE TAGS :) #include ...

    USE CODE TAGS :)


    #include <stdio.h>
    #include <math.h>

    int main(void) // good habit, i dont think your teacher would mind.
    {

    float r, a, p;
  13. It was never asked in this thread, getchar()...

    It was never asked in this thread, getchar() works, and it doesnt knock performance, so why NOT use it.



    Not necessarily , it likely shows a simple habit.



    But most of the time the best...
  14. Thread: Help with pow()

    by JDD
    Replies
    7
    Views
    2,201

    It returns a double doesn't it? ;x

    It returns a double doesn't it? ;x
  15. Replies
    59
    Views
    4,954

    It's a start in the right direction, but along...

    It's a start in the right direction, but along with adding main, please use code tags, ['Code]['/Code] tags, without the 's.

    Oh, and
    #include <math.h>
  16. Thread: Help with pow()

    by JDD
    Replies
    7
    Views
    2,201

    Oh thats right, the only way i can think of...

    Oh thats right, the only way i can think of printing it, would be to...



    int main()
    {
    int base, exp;
    double powr;
    char expc;
    scanf("%i", &base) ;
  17. Thread: Help with pow()

    by JDD
    Replies
    7
    Views
    2,201

    printf("%i ^ %i = %i\n" , base, exp, pow(base,...

    printf("%i ^ %i = %i\n" , base, exp, pow(base, exp));


    Try that.
    Or, you can always error check.



    int main()
    {
  18. Replies
    59
    Views
    4,954

    I'll be waiting, and don't feel discouraged,...

    I'll be waiting, and don't feel discouraged, theres only one way to learn. Part of being a good programmer is being able to ask questions, and seek assistance from others who can give it, and theres...
  19. Replies
    59
    Views
    4,954

    Your welcome, and dont feel annoying, to be...

    Your welcome, and dont feel annoying, to be honest, im bored, so this helps "entertain" me :)

    If you still can't manage to get it to work come on back, and ill show you how to do it
  20. Replies
    59
    Views
    4,954

    No, you could do exactly what i showed you. ...

    No, you could do exactly what i showed you.

    Here's how you would compute that equation, to my knowledge.




    p = a (r ( (pow( (1+r), n) ) ) / ( (pow( (1+r), n ) -1 ) ) )
  21. Replies
    59
    Views
    4,954

    Ill save you some time, pow(x, y) , computes x to...

    Ill save you some time, pow(x, y) , computes x to the power of y

    Example: p=a(r((1+r)^n))/((1+r)^n)-1))

    pow((1+r), n);
  22. Replies
    59
    Views
    4,954

    Are you sure theres no way to simplify the...

    Are you sure theres no way to simplify the equation?
  23. 1. Input doesn't NEED to be initialized. 2. I...

    1. Input doesn't NEED to be initialized.

    2. I agree that comparing an int to a float is wrong, and should be changed.

    3. I assume he IS running his program from command line "like all real...
  24. Posted in other topic.

    Posted in other topic.
  25. Thread: using if statement

    by JDD
    Replies
    8
    Views
    1,744

    Edit: Lets go through your code first... then ill...

    Edit: Lets go through your code first... then ill post a fixed program...



    : //Useless...
    #include <stdio.h>
    #include <math.h>

    int main()
    {
Results 1 to 25 of 25