UMBC CMSC104 | CSEE |
CMSC104Problem Solving and Computer ProgrammingSections 0201 and 0301 |
This project will show you the cost of credit cards. Normally, when you make a purchase on your credit card, the credit card company requires you to pay two percent of the outstanding balance. Interest rates on credit cards vary, but it is common to see 18%. Additionally, when the balance comes down to a certain dollar amount, then you pay it off. For this project, assume that when the balance reaches $15.00 (fifteen dollars), you pay it off the next month. Suppose you want a new computer. You find a nice one at $2000 (including tax). [I did say a nice one!] (Note: You must allow the user to enter the amount of the purchase, the interest rate, and the minimum month payment (expressed as a percentage of the balance).
Your project will calculate the interest due each month and add that amount to the principle. Then it will calculate the payment, which is based on the new principle! YOur program will assume that the monthly payment is submitted on time, so there is no late fees. Subtract the payment to get the balance that will be carried into the next month.
This one purchase will be the only purchase you make on the credit card.
You must determine the total amount of interest paid and the number of months it will take to pay off the credit card!
Note: The amount of interest you pay would be much lower it if they subtracted the payment before any other calculation.
The monthly payment is calculated by:
The new monthly balance is calculated as:
The term annual interest rate / 12 does not change each month, so only calculate that value once, or lose 5 points!
Enter the initial purchase: 2000
You will pay $5617.99 in interest.
Enter the annual interest rate (Enter 18% as 18): 18
Enter the minimum monthly payment (Enter 2% as 2): 2
It took 76 years and 10 months to pay off the purchase.
To pay off this charge in 18 months, the monthly payment must be: $xxxxxxx.xx.
When submitting the assignment, I only want the file 6789prj2.c. Please make the title and the file name the same when you submit it! If you submit a file name 6789prj3.c, the way we save the material delete everything but the last file with than name. Therefore, your file will be lost and we will give you a zero!!!! Use the last four of your SSN, not 6789!!!
Documentation | 25 points |
Correct Results | 25 points |
Correct Sytle | 25 points |
Other | 25 points |
You will lose 5 points if you do not name the file correctly.
You will lose 5 points if you calculate the monthly interest rate more than once.
You will lose 5 points if you email the project instead of submitting
it via Blackboard.
You will lose 5 points if the prompt is not on the next line.
/*****************************************************/ /* Program Header Block */ /* Filename: 6789prj3.c */ /* Name: Ima Student */ /* SSAN: 6789 */ /* Date: 28 Oct 2003 */ /* Course/section: CMSC-104/0102 */ /* Description: */ /* Analysis: */ /* Input: */ /* Output: */ /* Constraints: */ /* Formulas: */ /* Assumptions: */ /* Design: */ /* (Your psuedocode goes here.) */ /* */ /* Notes: (As needed.) */ /*****************************************************/