# 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. 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  ="< 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
Related Questions
 #include stdio.h> #include conio.h> #include string.h>   void del(char[],char *); main() {           char str[30],ch,*pp;           clrscr();           p •Flow Chart and Pseudocode of Add module - Hotel booking - Signup for new membership Delete module - Hotel reservation cancellation - Change of reservation Description: Create a program that allows the user to track the hours an employee worked in a week. How much the employee was paid and any extra hours worked (overtime pay). write a grading program for a class with the following grading polices: a.there are two quizzes eaxh graded on the basis of 10 points b.there is ome midterm exam and one final exam Define Keywords in C++ K e y w o r d s: K e y w o rd s a r e t h e w o rd s a l r e a d y u s e d b y C + + i n i t s c Operators in C++: All C operators are valid operators in C++ also.  Besides C++ has developed some new operators like Operators and their Expression: 1.      Logical op find out damjibhai can win Program is to define a class as employee: Write a program to define a class as employee and collect information about them by using classes and object class employee   { Normal 0 false false false EN-US X-NONE X-NONE Program is to define a class as student: Program is to define a class as student and display the records specific depending upon the number class student  {  private: