Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

CAN YOU HELP ME PLEASE I NEED IT TOM..

$
0
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;
}

Viewing all articles
Browse latest Browse all 51036


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>