Created
March 30, 2021 07:10
-
-
Save jagdish4501/87762a5d6c9341beda62c56ee59b7ac0 to your computer and use it in GitHub Desktop.
Write a program to calculate overtime pay of 10 employees. Overtime is paid at the rate of Rs. 12.00 per hour for every hour worked above 40 hours. Assume that employees do not work for fractional part of an hour.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
int p, nohw, how, owm; | |
//nohw=no of hour worked , how=hour over worked | |
//owm= over time worked money | |
for (p = 1; p <= 10; p++) | |
{ | |
printf("enter you hour worked="); | |
scanf("%d", &nohw); | |
how = nohw - 40; | |
if (how >= 1) | |
{ | |
owm = how * 12; | |
printf("your salary is = 'base salary'+%d Rs\n", owm); | |
} | |
else | |
printf("your salary is= 'base salery'\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment