Computing.Net > Forums > Programming > Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Help

Reply to Message Icon

Name: Irene
Date: October 5, 2002 at 08:45:06 Pacific
OS: pentium III
CPU/Ram: 600mhz/128MB
Comment:

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.00

It 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.




Sponsored Link
Ads by Google

Response Number 1
Name: Ronin
Date: October 5, 2002 at 11:08:26 Pacific
Reply:

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 definition

Take 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.


0
Reply to Message Icon

Related Posts

See More


calculator program please... C++ and Ms Visual C++



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Help

Javascript help www.computing.net/answers/programming/javascript-help/7520.html

Batch File Formmatting Help, Please www.computing.net/answers/programming/batch-file-formmatting-help-please/14040.html

Help With Visual Studio Express www.computing.net/answers/programming/help-with-visual-studio-express/14611.html