Thread: I just need help understanding this question.

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    20

    I just need help understanding this question.

    So basically all we know till now is basic programming. So while, and for loop, if and else functions, and int double and void functions, and a function with input and output parameters with a single return value or no return values. And the third one that you put a * before the variable so that the function could change the variable. So we used the C-free program to solve this question. So this is the question, and if anyone has a solution to all of it I could compare to mine I would be very grateful. This is not an ask for a homework , but it is me reviewing the questions on my book to train for the final. OKai this is the question.
    Problem 1
    #########
    Write a program that generates a customized loan amortization table. Your
    program will prompt the user to enter the amount borrowed (the principal),
    the annual interest rate, and the number of payments (n). To calculate the
    monthly payment, it will use the following formula:
    payment = (i * P) / (1 - (1 + i)^(-n)), where
    P = principal (the amount borrowed),
    i = monthly interest rate (1/12 of the annual rate)
    n = total number of payments.
    This payment must be rounded up to the nearest cent. After the payment was
    rounded, the program will write to the output file n lines showing how the
    debt is paid off. Each month part of the payment is the monthly interest on
    the principal balance, and the rest is applied to the principal. Because the
    payment and each month's interest are rounded up to the nearest cent, the
    final payment will be a bit different and must be calculated as the sum of
    the final interest payment and the final interest payment and the final principal balance. Here is the outcome that should appear for a 1000$ loan borrowed at a 9% annual interest rate paid over six months



    Principal $ 1000.00 Payment $171.07
    Annual Interest 9.0% Term 6 months
    Payment Number Toward Interest Toward Principal Principal
    1 $ 7.50 $163.57 $ 836.43
    2 $ 6.27 $164.80 $ 671.63
    3 $ 5.04 $166.03 $ 505.60
    4 $ 3.79 $167.28 $ 338.32
    5 $ 2.54 $168.53 $ 169.79
    6 $ 1.27 $169.79 $ 0.00
    Final payment: $171.06

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by Moody Barrawi View Post
    So this is the question, and if anyone has a solution to all of it I could compare to mine I would be very grateful.
    What about sharing your solution with us then?

    Quote Originally Posted by Moody Barrawi View Post
    This is not an ask for a homework , but it is me reviewing the questions on my book to train for the final. OKai this is the question.
    Unfortunately, this looks like an ask for doing the homework.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Welcome to forum Moody!

    Two things:

    1) We need to see what code you're asking questions about. Showing some output is good, but go into the "Advanced" editor and highlight the table or code, and click on the "code" tag. That will let the forum show the table or code, with the right spacing, font, etc. Otherwise everything gets pushed over to the left hand side of the post. Without code, specific directions are rather useless.

    2) As far as accuracy, Google for an amortization calculator for an easy check of your program's output.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner question about understanding general Syntax
    By lucidrave in forum C++ Programming
    Replies: 15
    Last Post: 08-13-2009, 03:57 PM
  2. Question understanding casted loop
    By elwad in forum C Programming
    Replies: 14
    Last Post: 05-23-2009, 04:13 PM
  3. Quick Understanding Question
    By leopardforest@g in forum C Programming
    Replies: 18
    Last Post: 04-14-2007, 08:13 PM
  4. Trivial Trigonometry Question, Need Help Understanding Concept
    By SourceCode in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-14-2003, 05:50 PM
  5. new question: understanding parse error
    By Pig in forum C++ Programming
    Replies: 3
    Last Post: 11-19-2003, 01:14 PM