Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please don't paste code from other website Make a program that will compute the taxes owed from thetable above.This assignment assumes Single filers. Prompt

C++ please don't paste code from other website

Make a program that will compute the taxes owed from thetable above.This assignment assumes Single filers.

  1. Prompt for the taxable income for a float value, a double value, and an integer value.
  2. Program a function template as described in section 16.2 and use the template to create methods that calculates the taxes.
  3. Display the tax rate found for the reported taxable income (from Column 1)
  4. Display the taxes owed for each of the 3 variable types entered. The resulting taxes need to be the same datatype from the given income.

Be sure to include the upper and lower range values in the calculations. I.E - Be sure that $9875 can be calculated and not bypassed.

image text in transcribedimage text in transcribed
Generated Function Code (Template Function) int square ( int number) Function Template { Function Calls return number * number; } intx=4, y; template y = square(x); > T square (T number) { return number * number; double x = 12.5, y; y = square(x); > } double square(double number) { return number * number; } Single filers A Tax rate 10% 12% 22% 24% 32% 35% 37% Taxable income bracket $0 to $9,875 $9,876 to $40,125 $40,126 to $85,525 $85,526 to $163,300 $163,301 to $207,350 $207,351 to $518,400 $518,401 or more Tax owed 10% of taxable income $987.50 plus 12% of the amount over $9,875 $4,617.50 plus 22% of the amount over $40,125 $14,605.50 plus 24% of the amount over $85,525 $33,271.50 plus 32% of the amount over $163,300 $47,367.50 plus 35% of the amount over $207,350 $156,235 plus 37% of the amount over $518,400

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

Students also viewed these Programming questions