Mortgage programming Question

This is a discussion on Mortgage programming Question within the C++ Programming forums, part of the General Programming Boards category; This is what I have so far am I not sure if I am writing this correctly. A home mortgage ...

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    7

    Mortgage programming Question

    This is what I have so far am I not sure if I am writing this correctly.

    A home mortgage authority requires a deposit on a home loan according to the following schedule:
    Loan$ Deposit
    Less than $25000 6% of loan value
    $25000-$49000 $1000+10% of loan
    $49000-$100000 $2000+25% of loan

    Loans in excess of $100000 are not allowed. Write a program that will read a loan amount and compute and print the required deposit.

    function get_deposit(loan as double)
    deposit = 0
    dim deposit as double
    if loan < 25000 then
    deposit = loan * 0.06
    else if loan < 49000 then
    deposit = loan * 0.1
    else if loan < 100000 then
    deposit = loan * 0.25
    else
    deposit = 0
    end if
    get_deposit = deposit
    end function

  2. #2
    C++ Junkie Mozza314's Avatar
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    174
    Dev C++ question !!!? - Yahoo! Answers

    Are you trying to get the internet to solve your problem for you?

    Also, this is a C++ forum, that code looks like Excel VBA.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    7
    I have no idea where to begin to answer that mortgage question. I was hoping I had a good start with what was posted

  4. #4
    C++ Junkie Mozza314's Avatar
    Join Date
    Jan 2011
    Location
    Australia
    Posts
    174
    Could you give some context to this question? Why are you on a C++ forum posting Excel VBA code? Have you just started a C++ course? If you don't know that a C++ program looks like:

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        cout << "Hello world!" << endl;
        return 0;
    }
    then you need to start somewhere like here (or lecture notes if you're doing a course), not asking a forum how to solve a specific problem.

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    7
    I was reading a c++ book and this was a question that was shown and I wanted to see what the answer would like in c++ format.

  6. #6
    Registered User
    Join Date
    Mar 2011
    Posts
    6
    snif snif.... I might be wrong, but this sounds very much like a homework exercise, and believe me no one on any forum will ever help unless they see some substantial effort to reaching an answer.
    If you saw that exercise in a c++ book, I suggest you read the chapters before, there probably will be there some material or topics that will help you to solve the problem.
    You can always attempt it yourself, and post-back with issues you have. The snippet you have above is very close to the answer though, I suggest you also google their equivalent.
    Happy Coding

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2011, 10:00 AM
  2. Question bout my work
    By SirTalksAlots in forum C Programming
    Replies: 4
    Last Post: 07-18-2010, 04:23 PM
  3. A question about a question
    By hausburn in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2010, 06:24 AM
  4. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21