User Profile

Collapse

Profile Sidebar

Collapse
thatwhiteguy
thatwhiteguy
Last Activity: Dec 16 '07, 03:07 PM
Joined: Nov 23 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thatwhiteguy
    replied to incorrect answer
    in C
    I pass the amount of the loan. We'll say 5700. The amount of interest, we'll say 12 . And the amount of total payments, we'll say 36....
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    started a topic incorrect answer
    in C

    incorrect answer

    I have been working on this program for a few days now, and I am at a loss as to what is wrong. I am new to c++, so I am sure that it must be something simple that I am missing, but I can not pin point it. Below is my code, and no matter what I input it gives me the same answer: $1.#INF. All I need for it to do is calculate the monthly payments .


    [CODE=cpp]#include <iostream>

    using namespace std ;
    ...
    See more | Go to post
    Last edited by Ganon11; Dec 15 '07, 01:03 AM. Reason: Please use the [CODE] tags provided.

  • thatwhiteguy
    replied to negative exponent
    in C
    alright, I have taken your advice, and here is the revised code. I am getting an error message. It says [Warning] in function 'double: I have no idea why it is saying this.


    #include <iostream>

    using namespace std ;
    //function prototype
    double payment(double balance, double AIR, int num_of_pay);
    //funciton prototyp
    double power (int num_of_pay, double AIR, float number);...
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    replied to negative exponent
    in C
    I see what you are saying about there being no multiplication, and so i changed the while loop to ;for (i=0; i< abs (num_of_pay); i++) result *= number;

    I don not know what you mean about me not calling my functions. I was wondering if you could elaborate for me. Thank you
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    replied to negative exponent
    in C
    here is the code that I have revised to. no matter what my input it always gives me the same answer. I am not sure what I am doing wrong.

    #include <iostream>

    using namespace std ;
    //function prototype
    double payment(double balance, double AIR, int num_of_pay);
    //funciton prototyp
    double power (int num_of_pay, double AIR, float number);
    int main ()
    {
    double month_pay;...
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    replied to negative exponent
    in C
    Alright, now that i fixed this, I am still coming up with the same answer no matter what data I input. I need for this function to be able to perform a negative exponentiation for a monthly payment calculator.
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    started a topic negative exponent
    in C

    negative exponent

    I am trying to create a function that computes a negative exponent. This is what I have, but it is not returning the proper answer. I was wondering if anyone can see where I have gone wrong. Thanks

    //This function raises 1+AIR to a negative n power

    float power (int num_of_pay, float number)
    {
    float result;
    int i;
    double AIR;



    number = (1 + AIR);...
    See more | Go to post

  • thatwhiteguy
    started a topic binomial coefficients
    in C

    binomial coefficients

    I have worked out all the bugs on my program. It is compiled and it actually runs. The problem I am having is it is not giving me the right answers. I know it must be something in my equation, but after looking at it for hours, I can't seem to locate the problem. Here is my equation:

    [code=c]
    denominator = 1 ; // initial value
    numerator = 1 ;
    for (i = 1 ; i <= k+1 ; i = i+1 )
    {...
    See more | Go to post

  • thatwhiteguy
    replied to Can't get this program to compile
    in C
    I appreciate the help. It did work, and my program can now compile. I have got the program to where it returns a value when n is less than k. However if it is not I get an error from microsoft and the program shuts down. I have been going over it for hours and just can't seem to find the problem. Thanks

    int binomial (int n, int k)

    /* Computes the binomial coefficient nCk */
    /*?????????????? ??????????????? ?????????...
    See more | Go to post

    Leave a comment:


  • thatwhiteguy
    started a topic Can't get this program to compile
    in C

    Can't get this program to compile

    I am trying to get this program to compile and it is not working. I am new to c ++ and frustrated beyond belief. Please help.

    #include "stdafx.h"
    #include <iostream>



    using namespace std ;

    int binomial(int n, int k) ; // function prototype

    int main(int argc, char**argp)

    {

    int n, k ; // parameters for the binomial number...
    See more | Go to post
No activity results to display
Show More
Working...