folk

            
             Income Tax Program
            
             Write a program to compute income tax for 10 employees using the following functions:
            
             void get_inputs (int *p_id, long *p_gross, long *p_deduc);
            
             Use get_inputs to input the following 3 values from the user:
             1) employee id (100-999 are valid)
             2) employee gross salary (0-200000 are valid)
             3) employee deductions (0-gross amt are valid)
            
             void find_income_tax (long e_gross, long e_deduc, long *p_net, double *p_taxrate, int *p_tax);
            
             In find_income_tax:
            
             1) hard code two arrays:
            
             income[5] = {10000, 20000, 45000, 70000, 200000}
             tax[5] = {10, 15, 20, 35, 50}
            
             2) calculate the net income (gross - deductions)
             3) look up the net income in the income array to determine the tax bracket and applicable taxrate (if net *= 10000 use 10%, net *= 20000 use 15%, etc...)
             4) calculate the tax payable (net * taxrate/100)
             5) return to main: net income, taxrate and tax payable (using pointers)
            
             Note: this function uses two arrays: income [5] and tax[5] with the breakdown of incomes and taxrates which are declared and initialized in the function.
            
             void print_results (int id, long net, int taxrate, double tax);
            
             As each employee is processed, print their employee ID, net income, taxrate and tax payable.
            
             void print_summary (ind id[], long net[], double tax[], double avg);
            
             Finally, after all employees have been processed, print a summary report which displays the employee ID, net income and tax payable for all employees paying more than the average tax payable. Also print the employee ID and tax payable for the highest tax payable and for the lowest tax payable of the 10 employees.
            
            
            
            
             #include *stdio.h*
             #define SIZE 10
             void get_inputs(int *p_id, long *p_gross, long *p_deduc);
             void find_income_tax (long e_gross, long e_deduc, long *p_net, int *p_taxrate,double *p_tax);
             void print_results (int id, long net, int taxrate, double tax);
             void print_summary (int id[], long net[], double tax[], double avg);
             void main ()
             {
             int id, taxrate, i;...

More Essays:

APA     MLA     Chicago
folk . (2000, January 01). In MegaEssays.com. Retrieved 01:43, May 20, 2024, from https://www.megaessays.com/viewpaper/58786.html