Program to calculate gross pay and tax payable, C/C++ Programming

Study the following table used to compute the tax payable by employees in certain organization


Gross Pay                                  Fewer than Three             Three or more

Dependents                        Dependents

KSh 10,000 or less                     Tax rate=0                          Tax rate=0

More than KSh10, 000 and

less than or equal to                   Tax rate=15%                     Tax rate = 10%

KSh20, 000

Over KSh20, 000                       Tax rate=35%                     Tax rate=25%


Write a C++ program inputs the gross pay and number of dependents of an employee and then computes the tax payable and net pay. The program should output gross pay, tax payable and the net pay of an employee in a suitable format.


Tax payable  = Gross pay  * Tax rate
Net pay  = Gross pay  - Tax payable



using namespace std;
int main  (  )


int no_dep;

double gross_pay,tax_rate,tax_payable,net_pay; cout<<"Enter the Employee gross pay"<>gross_pay;

cout<<"Enter the number of dependants"<>no_dep;


else if(gross_pay>10000 && gross_pay<=20000)















cout<<"Gross pay  ="<

cout<<"Tax payable  ="<

Posted Date: 8/21/2012 11:23:41 AM | Location : United States

Related Discussions:- Program to calculate gross pay and tax payable, Assignment Help, Ask Question on Program to calculate gross pay and tax payable, Get Answer, Expert's Help, Program to calculate gross pay and tax payable Discussions

Write discussion on Program to calculate gross pay and tax payable
Your posts are moderated
Related Questions
please may i have a brief theory about a c++ program to find net salary of employees

creating a system having five process from p0 to p4 and five resource types. create the need matrix use the safe algorithm to test if the system is in safe mode.

the program that solve the efficiency of otto cycle

Operation on array: void Array::add( Object& toAdd ) {     lastElementIndex++;     while( ptrAt( lastElementIndex ) != ZERO &&            lastElementIndex

Consider a group of n robots, numbered R2D1 through R2Dn, and m tasks, numbered 1 through m. Tasks can be different and robots are specialized, hence a given robot can only perform

FIT 3042 System Tools and Programming Languages Semester 1 2013 Assignment 1 An SDL video player for a custom video format Worth: 20% of final mark. Must be completed individually

Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides

In the final project assignment you are asked to develop an OOP C++ class hierarchy for derivative pricing, using the binomial tree and Black-Scholes option pricing methods. You wi

how to do an array

What is constructor or ctor? need help