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

Assignment Help:

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.

Hint:

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

 

#include 

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;

if(gross_pay<=10000)
     tax_rate=0;

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

if(no_dep<3)

tax_rate=15.0/100.0;

else

tax_rate=10.0/100.0;

}

else
{

if(no_dep<3)

tax_rate=35.0/100.0;

else

tax_rate=

25.0/100.0;

}

tax_payable=gross_pay*tax_rate;

net_pay=gross_pay-tax_payable;

cout<<"Gross pay  ="<

cout<<"Tax payable  ="<

C++, write a c++ program for minimum shelf downloads

write a c++ program for minimum shelf downloads

Write code in visual studio 2010, I have a mini project where I need to wri...

I have a mini project where I need to write a code .wonder if someone can help me.I already have the forms and webmaster page done just need to code portion

Poop, hwat is the area fsdjlakl;aeklfjtealrtl;gka

hwat is the area fsdjlakl;aeklfjtealrtl;gka

Example of pointers, #include "stdafx.h" #include iostream using name...

#include "stdafx.h" #include iostream using namespace std; int _tmain(int argc, _TCHAR* argv[]) {             int NumbHold[5];             int * ptrNumb;

How, how to program?

how to program?

Explain the rules for overloading an operator, Rules for overloading an ope...

Rules for overloading an operator This summarizes the most significant points you need to know in order to do operator function overloading. The only operators you may o

Basic concepts, what is the diffeerence between c and c++

what is the diffeerence between c and c++

Super ASCII string cost, string will contain only lower case alphabet& the ...

string will contain only lower case alphabet& the ascii value starts from 1-26,(ie,a=1&z=26).it perform the operation like the following costs:add=2units,replace=1unit,delete=3unit

Luminous Jewels - The Polishing Game, Byteland county is very famous for lu...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Write Your Message!

Captcha
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