0
#include <stdio.h>
#include <float.h>


float grosssalarycalc(float value1,float value2){
float gsalary;
gsalary=value1+value2;
return (gsalary);
}

float ovtmpayoutcalc(float value1){
float ovtmpayout;
ovtmpayout=25*value1;
return (ovtmpayout);
}

float netpayoutcalc(float value1){
float netsalary;
netsalary=value1-(value1*0.20);
return (netsalary);
}

int main() {
char name[32];
float ovtmpayout0,gross,net,ovtmhrs,salary;

printf("Payroll Calculation Program\n");
printf("Employee, please enter your name:\n");
scanf("%s", name);
printf("Employee, please enter your salary:\n");
scanf("%f", &salary);
printf("Employee, how many overtime hours have you worked?\n");
scanf("%f",&ovtmhrs);
printf("---------------------\n\n");

ovtmpayout0=ovtmpayoutcalc(ovtmhrs);
gross=grosssalarycalc(salary,ovtmpayout0);
net=netpayoutcalc(gross);

printf("October 16th, 2012\n");
printf("Employee Name: %s\n", name);
printf("Overtime Hours Worked: %.0f\n", ovtmhrs);
printf("Gross Payout: %.2f\n", gross);
printf("Net Salary: %.2f\n", net);

 system ("pause");
return 0;
}
2
Contributors
1
Reply
5
Views
4 Years
Discussion Span
Last Post by ram619
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.