Calculate the number of monthly payments

Assignment Help C/C++ Programming
Reference no: EM133234989

C/C++ Programming Assignment - Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Make files Gain more experience with Unix Learn to use some of the available math functions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price.

In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number of monthly payments you'll make. Fourth, raise the result of 1 plus the monthly rate to the negative power of the number of monthly payments you'll make. Fifth, subtract that result from 1. Sixth, divide the monthly rate by the result.

Last, multiple the result by the amount you want to borrow. In addition, you will add on PMI of 1% of the amount borrowed/12 if the down payment is less than 20% of the price of the home. This will stay the same for the life of the loan. Options: -s is optional and means that the mortgage will be a 15 year mortgage instead of the standard 30 year mortgage you would use as a default. -r is required and the argument is the yearly interest rate for the loan. The interest rate should be between 3% and 10%. -d is optional and the argument is the downpayment that will be made on the loan. It cannot be larger than the price of the home. You will print out the resulting payment amount as follows. Use rounding to keep money to two decimals and percentages to three decimals. "The payment on a loan of $###,###.## with an interest rate of #.###% for a term of ## years will be $##,###.##".

Reference no: EM133234989

Questions Cloud

Modern system of sexuality : Is the idea of repressive part of the modern system of sexuality?
What the leadership work traits of health care leader : What are the leadership work traits of an effective health care leader? Name 3 leadership-related assessment instruments and their functions
Write poem for spoken word poetry : Write poem for Spoken Word Poetry
Community service : What are some helpful comments that a community service provider might make in responding to a person in a manner that reflects appreciation
Calculate the number of monthly payments : Third, multiply the number of years in the term of the mortgage by 12 to calculate the number of monthly payments you'll make
Hokusai tuning the Samisen : Compare and contrast the following drawings: Hokusai's Tuning the Samisen and Rembrandt van Rijn's Eliezer and Rebecca at the Wall.
Inviting speaker to have persuasive speech : Make an invitation letter for inviting a speaker to have a persuasive speech in a certain talks or program.
Definition of freedom of speech : What is your definition of freedom of speech? How do you agree or disagree with other countries like Germany on their definition of freedom of speech?
Individual behavior that causes environmental harm : Tell us what you learned about using EBSCO, what you did to find the article and one problem you encountered when using the EBSCO database.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design, implement, test, and debug a simple visual basic

Design, implement, test, and debug a simple Visual Basic® program. Requirements The GUI program will have a button that creates a new window with the word Hello. Enhance the display by making the word change color, move, or change to another lang..

  Program that computes the total price of tickets

Write a program that computes the total price of tickets that a customer orders. The program should prompt the user for the number of the destination city and the number of tickets desired.

  Given the integer variables yearswithcompany and department

Given the integer variables yearsWithCompany and department , write an expression that evaluates to true if yearsWithCompany is less than 5 and department is not equal to 99 .

  Investigate the use of the random generator function

For this assignment you will have to investigate the use of the C++ random generator function, rand(). Rand() produces a random integer in the range of 0 to RAND_MAX (a constant -- often 32767 -- defined in the stdlib, automatically included in al..

  Wap that inputs the name and quantity of three items

Write a program that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with a tax rate of 6.25%.

  Employee of a certain company

Each employee of a certain company is in either Department X or Department Y, and there are more than twice as many employees in Department X as in Department Y.

  Write a c program that reads in two sets of numbers a and b

Write a C program that reads in two sets of numbers A and B, and calculates and print their union (AυB) and intersection (A∩B). (AυB) is the set of elements that appear in either A or B, and thatA∩B is the set of elements that appear in both A and B...

  Computes and stores appropriate points for given face value

Creates of the given face value. Computes and stores the appropriate points for the given face value. Set the suit as Spades.

  Develop a cpp program that input the miles driven

Develop a C++ program that uses a while loop to input the miles driven and gallons used for each trip. The program should calculate and display the miles per gallon obtained for each trip and print the combined miles per gallon for all tankfuls up..

  Irrespective of the old ui

Generate a Drag and Drop UI, where the enduser can change UI elements by dragging and dropping then later when the same user again comes and access the UI then what the changes he made on UI earlier should be presented there irrespective of the ol..

  Write a code to reverse the order of the items in q

Write a C++ function void SelectItem(stack &S, ItemType n); that finds the first occurrence of item n on stack S and moves it.

  Add the results of the array together

How do you add a function in an array to add the results of the array together? Also how do you alter the sort part of the function to sort from a different cat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd