Write a function to calculate tax

Assignment Help C/C++ Programming
Reference no: EM13702331

Question:  You have to write a function to calculate tax, the sample output is : Filing Status (1) Single (2) Married (3) Head of Household (0)

Quit Program Please make selection: -8 Invalid choice, make a selection again: 6 Invalid choice, make a selection again: 4 Invalid choice, make a selection again: 1 Enter the annual income: 35000 Your tax rate is: 20 % You pay $7000.00 in taxes.

After taxes your net income is: $28000.00 When enter 1, it will calculate tax of a person who is single.

When enter 0, it will exit at once.

How can I solve this problem? When enter 1, Find single , when enter 2, calculate married. Can you show me some example?

Tax= (Income * Tax Rate) / 100 Net Income = Income - (Income * Tax Rate) / 100

You have to implement this program in C language and use a switch statement.

 

Reference no: EM13702331

Questions Cloud

Program to find real and complex roots of quadratic equation : Write a VBA program to find the real and complex roots of the quadratic equation.
What is the molarity of the diluted hcl : Question- If 25.00 mL of 6.00 M HCl is transferred by pipet into a volumetric flask and diluted by 5.00 L, what is the molarity of the diluted HCl
Program to check a social security number is valid or not : Write a program that prompts the user to enter a social security number in the format DDD-DD-DDDD, where D is a digit. The program displays "Valid SSN" for a correct social security number and "Invalid SSN" otherwise.
Describe how you would prepare a potassium nitrate solution : Question- Describe how you would prepare 465 ml of a .3550 M potassium nitrate solution starting with a) solid potassium nitrate b) 0.750 M potassium nitrate solution
Write a function to calculate tax : write a function to calculate tax, the sample output is : Filing Status (1) Single (2) Married (3) Head of Household (0)
Draw a state diagram that depicts a simple system : Draw a state diagram that depicts a simple system that stacks and unstuck a set of Russian "Matryoshka" dolls. Matryoshka dolls are hollow wooden dolls that can be separated in two parts, revealing a smaller doll inside
Calculate delta g for the balanced redox reaction : Use the tabulated half-cell potentials to calculate delta G for the following balanced redox reaction. Pb2+(aq) + Cu(s) --> Pb(s) + Cu2+(aq)
Write methods to retrieve information about a note : calculate the frequency, use the formula 440 x 2^(n/12) where n is the note number - implement a class that will be used to hold information about a musical note.
What was the students calculated value of r : Question- A student reacted 0.054 g of magnesium in a audiometer filled with water and Hcl. the water temperature wa 22.0 C. the barometer read 29.56 in Hg and 50.2 ml of gas wa collected. What was the students calculated value of R? What is the pe..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Smallest sequence of numbers in the array

Write a function called sum_smallest_sequence() that accepts an array of  signed  integers and the  number  of items in the array as arguments, and returns the sum of the smallest sequence of numbers in the array.

  Use a define statement to create a constant

Follow these specifications: Use a define statement to create a constant that will hold your student number. You should have separate string variables for your first and last name; name these first_name and last_name.

  Design and implement a c program and structure diagram for

design and implement a c program and structure diagram for the subsequent specification.show writing and calling

  Program to produce ten random permutations of numbers

In C++(must be able to compile in Visual Studio ): Write a program to produce ten random permutations of numbers 1 to 10.

  Prepare a cc program that uses the pthread library to

prepare a cc program that uses the pthread library to create threads and mutexes to synchronize them. the program must

  Your city''s parking violation

Your city's Parking Violation Bureau wants you to write a program to compute fines for parking violations.

  Explain function which builds the multi-dimensional vector

A separate function which outputs the multi-dimensional vector to the screen.

  What''s a more efficient way to write

What's a more efficient way to write this function for a matrix? This one has to go through all the numbers, but that would take too long. r_num is row and c_num is column

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

  Write a program that takes data a line at a time

Write a program that takes data a line at a time and reverses the words of the line

  Write a program that uses joptionpanes to perform

For example, if the distance of travel is 30 kilometers, the time of travel is 2 hours, then the speed is 30/2 = 15 (kilometers per hour).

  Program to compute surface area of sphere using function

Write down a program in C++ to compute surface area of sphere using a function. As sample run, write down the surface areas of spheres with radii.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd