subject

You have just started work at your first programming job and you have been offered a salaryplus benefits as part of your employment package. One of your benefits is the option tocontribute to a 401k or a 403b plan to save for retirement. Write a program using a Stack(s)data structure thata. Captures the amount from the user they wish to contribute each yearb. Captures the percentage of interest that the user thinks they will earn each yearc. Display of the earnings they will earn each year over a 30 year period starting with themost recent year and ending with the first yearPseudocode for potential solution:(NOT REQUIRED TO BE USED)1.Capture the numerical amount to contribute (e. g. 19500)2.Store to a variable (A)3.Capture the interest rate you want to earn (B)4.Establish a variable to calculate/store the annual total (C)5.Establish a variable to store a running total (D)6.Create an empty Stack data structure (TheStack)7.Create a loop that will loop through 30 cycles for each year8.Calculate the value of A * B and set it equal to C9.Store C to the Stack10.Add C to D11.Loop until all 30 values are stored12.Display Stack values13.Display Total Value D YOUR SOLUTION MUST USE A STACK/STACKS TO STORE/PROCESS THE DATA

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
You know the right answer?
You have just started work at your first programming job and you have been offered a salaryplus bene...
Questions
question
Mathematics, 05.12.2020 07:30
question
Geography, 05.12.2020 07:30
question
Engineering, 05.12.2020 07:30
question
History, 05.12.2020 07:30
Questions on the website: 13722362