Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

debug: This program accepts a user's salary It assumes the user will earn 6% more every year for a 45 year career. Output is the

debug:

This program accepts a user's salary It assumes the user will earn 6% more every year for a 45 year career. Output is the final salary and the total earned during the career Here's an example of what the program should do: Suppose the number of YEARS is 3 instead of 45 and the RATE is .10 (10%) instead of .06 (6%). Next suppose the user enters a SALARY of $1,000. For year #1 the SALARY is $1000. For year #2 theres a 10% increase of $100 so the SALARY is $1100. For year #3 theres a 10% increase of $110 so the SALARY is $1210. And then the TOTAL "Lifetime earnings" for 3 years would be: $1000 + $1100 + $1210 = $3310.

start num RATE = 0.06 num YEARS = 45 num yr = 1 num salary num total input salary while yr <= YEARS salary = salary + salary + RATE output "At end of year ", yr, salary will be ", salary total = total + 1 endwhile output "Lifetime earnings: ", salary stop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions