![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Need help with a c++ program dealing with interest compounded monthlysorry i know most of ya'll dont like to do homework for others, and if i did it myself it would be better for me but im failing my class and if i can get a good grade on this i will be able to stay in it long enough to learn how to do it, so if u can help me with it i would be really greatful, now i know it needs at least 2 for statments and i can use a function to print when its needed but i just cant get it heres the program they want me to write
Hulk Hogan invests in a Roth IRA. He plans to put $200 in the account on the first of each month, beginning on Jan 1, 2007. His last payment will be on Dec 1, 2036. His money earns a (% annual interest rate, compounded monthly. Calculate and print his balance on January 1 of each year, from 2007 until 2037. Do not print the other months. now if no ones wants to help or think its better that i do it on my own i understand, i'll be workin on it myself and try to get it, its due the 30th of october, but i know i'll fail it, so thanks neway this is what i have so far i know basics [tagindicator] CPP / C++ / C Code:
and i know the formula for the compounded is monthly = P (1 + r/12)12 P is the principal (the initial amount you borrow or deposit) r is the annual rate of interest (percentage), but im not sure how to have it print out every january 30 times or the right setw and setprecision or float to have it line up. |
|||
|
#2
|
||||
|
||||
Re: Need help with a c++ program dealing with interest compounded monthlyI guess you read whatever is in your input file and use whatever data is in it to help you calculate the IRA.
For the section you don't know what to do, you will need a loop to calculate each month's balance. Then every time the month becomes January, output the current balance before calculating the new balance. Two ways to handle the loop: 1) one loop and keep track of when January comes around 2) two loops, one to keep track of the years, and inside that loop another loop to calculate the months of the year. A little easier to keep track of when January arrives, but a more complex looping structure. __________________
During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence? |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| Monthly Minimums on Merchant Accounts | omupas | eCommerce / Merchant Account Forum | 0 | 12-Mar-2007 13:34 |
| BOOKEEPING program, HELP!! | yabud | C Programming Language | 10 | 17-Nov-2006 04:48 |
| Pipeline freeze simulation | darklightred | C++ Forum | 6 | 27-Jul-2006 20:37 |
| Java GUI Mortgage Program | Harryt123 | Java Forum | 0 | 21-Jul-2006 17:57 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The