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

  Write a program that allows a user to enter 12 double values

Write a program that allows a user to enter 12 double values representing store sales for each month of one year. After all 12 values are entered,

  Write a menu-driven c program

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

  Reading of coefficients

Reading of coefficients a, b, c shall be done by a function named readCoeffs(). They shall be entered as double's from the keyboard by an operator, after prompt, as follows.

  The grid is populated randomly

Initially, the grid is populated randomly with occupied and empty cells. Once the initial grid has been created, the program loops. Each iteration of the loop represents a tick or time step in the environment.

  Write a program that accepts as input, without prompts

Write a program that accepts as input, without prompts, a series of short values, terminated by end of file. The program outputs one line:

  Function odd_fill() that fills all integers between two poin

write a function odd_fill() that fills all integers between two pointers, first and last, with a sequence of odd integers: 1,3,5,7

  For this program reads the first 11 characters

E main for this program reads the first 11 characters from input, saving them. It then reads 26 short integers into |vals|, and passes them and the characters to EmbedWatermark, which subtly alters the contents of vals to contain the characters. A..

  C++ class that has a dynamic array of a string

show  an example of a C++ Class that has a dynamic array of a string that takes in names by user input??

  Integer arguments representing feet

A constructor that will take a single integer argument representing a whole number of feet • A constructor that will take two integer arguments representing feet and inches respectively • A constructor that will take three integer arguments represent..

  Find the amount in the savings act each month

Suppose you start with $1000 and each month you contribute $100. suppose that the interest rate is 6%per year compounding monthy,which is equal to 0.5% each month.

  50 element array of integers with random numbers

write a java code to instantiate and initialize a 50 element array of integers with random numbers in the range of 45 through 256 inclusive.

  Uml diagram of all the classes

Speaking of converting into the correct object-type, the goal of the factory is to abstract away object creation.

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