subject

An investment company guarantees a 2% monthly compounded return on your investment. You want to see how long it takes to reach a total of $500,000 dollars in investment plus return. Write a program that allows the user to enter a continuous monthly investment (Example - $200 every month) or ($600 every month). The program should call a recursive method that returns and displays the total months needed to reach the $500,000 dollar goal. Example - At the 2% compounded monthly rate, and a $400 continuous monthly investment, the first month the user makes $8 interest and has $408.00 dollars, the second month the user adds $400 and makes $16.16 interest and now has $824.16, the third month the user adds $400 and makes $24.48 in interest and now has $1,248.64 dollars, etc. Display how many total months it takes the user to reach the $500,000 dollar goal. Remember, the user should be able to input the continuous monthly investment. The rate is always 2% and compounded monthly.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
question
Computers and Technology, 24.06.2019 17:50
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences.a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
question
Computers and Technology, 25.06.2019 04:10
This might be a bit off-topic, but i'm having trouble with a certain arg made by game theory. if there are any theorists out there that wanna , it would be appreciated!
Answers: 2
You know the right answer?
An investment company guarantees a 2% monthly compounded return on your investment. You want to see...
Questions
question
Computers and Technology, 04.11.2020 02:00
question
Mathematics, 04.11.2020 02:00
question
History, 04.11.2020 02:00
question
History, 04.11.2020 02:00
question
Mathematics, 04.11.2020 02:00
Questions on the website: 13722363