Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need help to make a program that analyzes credit card debt. This is a homework that I have to do and I don't have a clue who to do it.
PLEASE help me
Problem Description:
Write a C program that will help a user analyze credit card debt. Your program should read in a credit card balance, annual interest rate, and current minimum payment. From this information, you will first calculate the number of months it would take to payoff the credit card based on the minimum payment. Then you will recommend that the user increase the minimum payment. Again, you will calculate the number of months it would take to payoff the credit card. Finally, you will indicate the difference (in months) of the two loan periods.Debt Analysis Program:
--Enter credit card's current balance: 1900.00
Enter annual interest rate (as decimal): 0.1658
Enter minimum payment: 35.00It will take 103 months to payoff this card with this minimum payment.
Try increasing your payment by at least $10...
New minimum payment: 45.00
Now it will take 65 months to payoff this credit card.
You would reduce your loan period by 38 months with the new minimum payment.
Note: The output of your program MUST follow the format given above (i.e., wording and spacing). Do not change the format in any way. Also, the credit card balance, interest rate, and minimum payments are inputs provided by the user. Based on the user's information, the calculations should match those above. Be advised that your programs may be checked with inputs other than those provided in the sample run above.

I would suggest that you write a couple of functions to calculate the interest rate and the suggested num of payments to make.
Since your looking for floating point values, start there.
float APR, balance;
int months;
char *messages[num of messages] = { "mess1", mess2", "messn" };functions
float calcAPR(float, float); // prototype
.. main
local variables
float result, APR, balance;printf("Enter your balance and the % rate: ");
scanf("%f %f", &balance, &APR);result = calcAPR(balance, APR);
printf("New balance is %.2f", result);
..// end main
float calcAPR(float num1, float num2)
{
...// algorithm
return result of balance or whatever value that you need to use.
} // end definitionTake what you've done thus far and post it here. The cboard has a lot of people who will help you out provided that you post your source code and keep the questions specific to a single problem area. If you choose to post there, make sure that you use code tags as the mods will flame you beyond belief. :P
[code]
you c code
[/code]Good luck.

![]() |
calculator program please...
|
C++ and Ms Visual C++
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |