Solutions 9 num inputDollarAmt Declarations num dollars num QUIT 0 output Enter

# Solutions 9 num inputdollaramt declarations num

• Homework Help
• 37
• 93% (61) 57 out of 61 people found this document helpful

This preview shows page 4 - 8 out of 37 pages.

3.Create the logic for a program that calculates and displays the amount of money you would have if you invested \$5000 at 2 percent interest for one year. Create a separate method to do the calculation and return the result to be displayed.
Programming Logic and Design, 7e 4.Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. Pass both values to a method that displays the amount you must save per month to achieve your goal.
Programming Logic and Design, 7e Solutions 9- Pseudocode: start Declarations num vacaCost num monthsUntil num save output “Enter the projected vacation cost ” input vacaCost output “Enter the number of months until your vacation ” input monthsUntil save = savePerMonth(vacaCost, monthsUntil) 6
Programming Logic and Design, 7e 5.a. Create the logic for a program that performs arithmetic functions. Design the program to contain two numeric variables, and prompt the user for values for the variables. Pass both variables to methods named sum()and difference()Create the logic for the methods sum()and difference(); they compute the sum of and difference between the values of two arguments, respectively. Each method should perform the appropriate computation and display the results. .