Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 3 ( 3 5 marks ) For this task, you are to write code that calculates the maximum yearly income tax given by an

Task 3(35 marks)
For this task, you are to write code that calculates the maximum yearly income tax given by an individual within a period of multiple years.
Instructions
Your program should first ask the user to input a number of years. The program should then repeatedly ask the user to input a yearly tax amount until the specified number of years is reached. Finally, the program should output the maximum yearly income tax of the user based on the input values.
Hint: consider which form of aggregation might be appropriate for solving this problem.
If the user inputs zero for the number of years, the program should output a friendly message informing the user that maximum tax could not be calculated.
Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:
You must choose appropriate data types for user input.
Your solution must not crash if the user inputs zero for the number of years.
Your solution must be implemented using a while loop.
You must indicate which year the input is for as part of your income tax prompt (see example runs).
You must not use any conpcets not covred yet
image text in transcribed

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

What are some of the tools used to convert data into information?

Answered: 1 week ago

Question

11. Identify the apotheosis in Indiana Jones and the Last Crusade.

Answered: 1 week ago

Question

Define and discuss affirmative action.

Answered: 1 week ago

Question

Discuss diversity management.

Answered: 1 week ago