Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8) Assume the income tax of the employees of a company is calculated based on two factors: the total income and the number of children.

image text in transcribed
8) Assume the income tax of the employees of a company is calculated based on two factors: the total income and the number of children. Tax is calculated as follows: 10% if the income is less than 30,000. 20% if the income is greater or equal to 30,000 and the employee has 3 children or more. 30% if the income is greater or equal to 30,000 and the employee has fewer than 3 children. Write a program that asks the user to enter his/her income and number of children then calculates and prints the amount of tax that he/she should pay 9) Write an interactive program that computes the area of a rectangle (area base height) or a triangle (area-0.5 base height) after prompting the user to type the first character of the figure name (R or T). Your program must display an error message to indicate that the user entered a character other than R or T. 8) Assume the income tax of the employees of a company is calculated based on two factors: the total income and the number of children. Tax is calculated as follows: 10% if the income is less than 30,000. 20% if the income is greater or equal to 30,000 and the employee has 3 children or more. 30% if the income is greater or equal to 30,000 and the employee has fewer than 3 children. Write a program that asks the user to enter his/her income and number of children then calculates and prints the amount of tax that he/she should pay 9) Write an interactive program that computes the area of a rectangle (area base height) or a triangle (area-0.5 base height) after prompting the user to type the first character of the figure name (R or T). Your program must display an error message to indicate that the user entered a character other than R or T

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions