SlideShare ist ein Scribd-Unternehmen logo
1 von 16
MAKERERE UNIVERSITY
SCHOOL OF STATISTICS AND PLANNING
DEPARTMENT OF STATISTICAL METHODS
BACHELOR OF STATISTICS
AND
BACHELOR OF SC IN ACTUARIAL SCIENCE 2011/2012
GROUP 10
TASK
• A given organisation has 30 employees with a policy of no increase
nor decrease in the number of staff. You are required to design a
computer program that computes the net pay of employees. Note
that the system requires the following
• Identification number of employees
• Name of employees
• Sex
• Department
• Gross pay
• Birth day of employees
• Etc
• Note tax = 30% of the gross pay
REQUIRED
• A company requires a data base of its employees
with all the details of the employees including the
gross pay
• A computer program that computes the net pay of
employees putting into consideration the gross
pay and the tax rate of employees
• Note, in Uganda employees earning bellow
shs.130000 do not pay tax, in our program we
considered employees earning a gross pay bellow
shs.200000 do not pay tax
CHOICES AND DECISIONS
• We decided to use c programming language
when designing the program that computes the
net pay because of the following
1. C language is simple to learn and adopt to.
2. C language is portable, a program can be
designed on one system and be used on a
different system
STEPS IN DESIGNING THE PROGRAM
• After designing a database system of the 30
employees, we were in position to design the
program
• We calculated the tax paid by each employee
putting into consideration the gross pay earned
i.e. gross pay > 200000
Tax paid= 0.3 * gross pay
While gross pay < = 200000
Tax paid = shs.0
CONTINUATION
• After calculating the tax paid by each
employee,
We calculate the net pay of the employees
i.e. net pay = gross pay – tax paid
• from the above employees earning
shs.200000 and below do not pay tax and there
fore their
Net pay = gross pay
C TECHIQUES USED
• In the program we used a “for” loop to control the
number of employees to which the net pay is
calculated.
• All the details of the employee as got from a database
of the company are entered in the main function under
the “for” loop, like the name , sex and gross pay
• Our for loop statement has three parts, the part that
initialises the employee, its executed, then the second
condition if its true, the loop continues i.e. if the
number of employees is still less than 30, when the
second condition is wrong, the program exits the loop.
CONTINUATION OF THE TECHIQUES
• The “for” loop statement is nested as it
contains the “if” statement in it.
• The use of the “if ” statement is to control the
calculation of net pay, as it contains a Boolean
statement i.e. gross>200000 where if the
conditions is true, the calculation of the net
pay is executed but when the condition is false
the calculation are not executed as shown
above.
PROGRAM CYCLE
• Including a header statement.
• Initialising the size of employees to be considered
• Declaring local variables to be used in the
program
• Introducing the main function, and in the main
function we declared a “for” loop and an if
condition in it
• Entering the employee data form the data base i.e.
name, sex, department, gross pay.
• At the if condition we check whether the gross
pay is greater than 200000 and if yes tax is
calculated and net pay got by subtracting the tax
paid from gross pay
When the gross pay is less than 200000 or equal to
200000, the tax paid is zero(0) and thus the net
pay equals to the gross pay
At the end the program prints the name
department and gross pay plus net pay in tabulat
form.
CONCLUSION
• From above the program calculates the net pay
of the employees putting into consideration the
gross pay,
• The program is case sensitive on the amount
earned by each employees as those earning
shs.200000 and below
C program to calculate net pays

Weitere ähnliche Inhalte

Ähnlich wie C program to calculate net pays

Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2Rohit malav
 
PAYROLL MANAGEMENT.pptx
PAYROLL MANAGEMENT.pptxPAYROLL MANAGEMENT.pptx
PAYROLL MANAGEMENT.pptxSuraj857568
 
PAYROLL MANAGEMENT (1).pptx
PAYROLL MANAGEMENT (1).pptxPAYROLL MANAGEMENT (1).pptx
PAYROLL MANAGEMENT (1).pptxSuraj857568
 
A computerized payroll system for the barangay hall
A computerized payroll system for the barangay hallA computerized payroll system for the barangay hall
A computerized payroll system for the barangay hallAcel Carl David O, Dolindo
 
ODTUG Configuring Workforce: Employee? Job? or Both?
ODTUG Configuring Workforce: Employee? Job? or Both? ODTUG Configuring Workforce: Employee? Job? or Both?
ODTUG Configuring Workforce: Employee? Job? or Both? Alithya
 
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptx
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptxPPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptx
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptxSuraj857568
 
Payroll management
Payroll managementPayroll management
Payroll managementAnita Yadav
 
ERPNext system (CubeTech)
ERPNext system (CubeTech)ERPNext system (CubeTech)
ERPNext system (CubeTech)noossaa
 
Payroll management system for Employee
Payroll management system for Employee Payroll management system for Employee
Payroll management system for Employee Chhabi Lal Garhewal
 
Learn to Create a Payroll Summary Report in QuickBooks.pptx
Learn to Create a Payroll Summary Report in QuickBooks.pptxLearn to Create a Payroll Summary Report in QuickBooks.pptx
Learn to Create a Payroll Summary Report in QuickBooks.pptxDancing Numbers
 
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...Interpreting your pennsylvania unemployment compensation (uc) contribution ra...
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...James Baker, SPHR Retired, MAS
 
Payroll process oracle hrms
Payroll process oracle hrmsPayroll process oracle hrms
Payroll process oracle hrmsShaju Shana
 
PF revised wage ceiling limit and its impact
PF revised wage ceiling limit and its impactPF revised wage ceiling limit and its impact
PF revised wage ceiling limit and its impactGreytip Software
 
Sap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneSap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneAspire Techsoft Academy
 
What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it Time Doctor
 

Ähnlich wie C program to calculate net pays (20)

Payroll Sytem
Payroll SytemPayroll Sytem
Payroll Sytem
 
Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2Payroll system ppt2 (rohit malav) version point 2
Payroll system ppt2 (rohit malav) version point 2
 
PAYROLL MANAGEMENT.pptx
PAYROLL MANAGEMENT.pptxPAYROLL MANAGEMENT.pptx
PAYROLL MANAGEMENT.pptx
 
PAYROLL MANAGEMENT (1).pptx
PAYROLL MANAGEMENT (1).pptxPAYROLL MANAGEMENT (1).pptx
PAYROLL MANAGEMENT (1).pptx
 
A computerized payroll system for the barangay hall
A computerized payroll system for the barangay hallA computerized payroll system for the barangay hall
A computerized payroll system for the barangay hall
 
ODTUG Configuring Workforce: Employee? Job? or Both?
ODTUG Configuring Workforce: Employee? Job? or Both? ODTUG Configuring Workforce: Employee? Job? or Both?
ODTUG Configuring Workforce: Employee? Job? or Both?
 
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptx
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptxPPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptx
PPPPPPPAYROLL_MANAGEMENT_SYSTEM_BOO.pptx
 
Payroll management
Payroll managementPayroll management
Payroll management
 
ERPNext system (CubeTech)
ERPNext system (CubeTech)ERPNext system (CubeTech)
ERPNext system (CubeTech)
 
Payroll
PayrollPayroll
Payroll
 
Payroll management system for Employee
Payroll management system for Employee Payroll management system for Employee
Payroll management system for Employee
 
2.8 payroll applications
2.8 payroll applications2.8 payroll applications
2.8 payroll applications
 
Learn to Create a Payroll Summary Report in QuickBooks.pptx
Learn to Create a Payroll Summary Report in QuickBooks.pptxLearn to Create a Payroll Summary Report in QuickBooks.pptx
Learn to Create a Payroll Summary Report in QuickBooks.pptx
 
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...Interpreting your pennsylvania unemployment compensation (uc) contribution ra...
Interpreting your pennsylvania unemployment compensation (uc) contribution ra...
 
Payroll process oracle hrms
Payroll process oracle hrmsPayroll process oracle hrms
Payroll process oracle hrms
 
PF revised wage ceiling limit and its impact
PF revised wage ceiling limit and its impactPF revised wage ceiling limit and its impact
PF revised wage ceiling limit and its impact
 
Payroll processing
Payroll processingPayroll processing
Payroll processing
 
Sap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in PuneSap hcm payroll concept - Best SAP HR Training Institute in Pune
Sap hcm payroll concept - Best SAP HR Training Institute in Pune
 
What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it What is employee productivity ratio & How do you Calculate it
What is employee productivity ratio & How do you Calculate it
 
Incentive plans
Incentive plansIncentive plans
Incentive plans
 

Kürzlich hochgeladen

Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdftbatkhuu1
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseribangash
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurSuhani Kapoor
 

Kürzlich hochgeladen (20)

Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdf
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
Nepali Escort Girl Kakori \ 9548273370 Indian Call Girls Service Lucknow ₹,9517
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service JamshedpurVIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
VIP Call Girl Jamshedpur Aashi 8250192130 Independent Escort Service Jamshedpur
 

C program to calculate net pays

  • 1. MAKERERE UNIVERSITY SCHOOL OF STATISTICS AND PLANNING DEPARTMENT OF STATISTICAL METHODS BACHELOR OF STATISTICS AND BACHELOR OF SC IN ACTUARIAL SCIENCE 2011/2012 GROUP 10
  • 2. TASK • A given organisation has 30 employees with a policy of no increase nor decrease in the number of staff. You are required to design a computer program that computes the net pay of employees. Note that the system requires the following • Identification number of employees • Name of employees • Sex • Department • Gross pay • Birth day of employees • Etc • Note tax = 30% of the gross pay
  • 3. REQUIRED • A company requires a data base of its employees with all the details of the employees including the gross pay • A computer program that computes the net pay of employees putting into consideration the gross pay and the tax rate of employees • Note, in Uganda employees earning bellow shs.130000 do not pay tax, in our program we considered employees earning a gross pay bellow shs.200000 do not pay tax
  • 4. CHOICES AND DECISIONS • We decided to use c programming language when designing the program that computes the net pay because of the following 1. C language is simple to learn and adopt to. 2. C language is portable, a program can be designed on one system and be used on a different system
  • 5. STEPS IN DESIGNING THE PROGRAM • After designing a database system of the 30 employees, we were in position to design the program • We calculated the tax paid by each employee putting into consideration the gross pay earned i.e. gross pay > 200000 Tax paid= 0.3 * gross pay While gross pay < = 200000 Tax paid = shs.0
  • 6. CONTINUATION • After calculating the tax paid by each employee, We calculate the net pay of the employees i.e. net pay = gross pay – tax paid • from the above employees earning shs.200000 and below do not pay tax and there fore their Net pay = gross pay
  • 7. C TECHIQUES USED • In the program we used a “for” loop to control the number of employees to which the net pay is calculated. • All the details of the employee as got from a database of the company are entered in the main function under the “for” loop, like the name , sex and gross pay • Our for loop statement has three parts, the part that initialises the employee, its executed, then the second condition if its true, the loop continues i.e. if the number of employees is still less than 30, when the second condition is wrong, the program exits the loop.
  • 8. CONTINUATION OF THE TECHIQUES • The “for” loop statement is nested as it contains the “if” statement in it. • The use of the “if ” statement is to control the calculation of net pay, as it contains a Boolean statement i.e. gross>200000 where if the conditions is true, the calculation of the net pay is executed but when the condition is false the calculation are not executed as shown above.
  • 9. PROGRAM CYCLE • Including a header statement. • Initialising the size of employees to be considered • Declaring local variables to be used in the program • Introducing the main function, and in the main function we declared a “for” loop and an if condition in it • Entering the employee data form the data base i.e. name, sex, department, gross pay.
  • 10. • At the if condition we check whether the gross pay is greater than 200000 and if yes tax is calculated and net pay got by subtracting the tax paid from gross pay When the gross pay is less than 200000 or equal to 200000, the tax paid is zero(0) and thus the net pay equals to the gross pay At the end the program prints the name department and gross pay plus net pay in tabulat form.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. CONCLUSION • From above the program calculates the net pay of the employees putting into consideration the gross pay, • The program is case sensitive on the amount earned by each employees as those earning shs.200000 and below