From c870367f5333a63f08396d0a38631ac67ea2eec1 Mon Sep 17 00:00:00 2001 From: divyansh1002 <56514855+divyansh1002@users.noreply.github.com> Date: Sun, 13 Oct 2019 22:21:42 +0530 Subject: [PATCH] code for overtime pay --- D1.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 D1.c diff --git a/D1.c b/D1.c new file mode 100644 index 0000000..2e85227 --- /dev/null +++ b/D1.c @@ -0,0 +1,22 @@ +#include +int main() +{ +float pay; +int i=1,h; +while(i<=10) +{ +printf("enter the no of hours worked"); +scanf("%d",&h); +if(h>=40) +{ +pay=(h-40)*12; +printf("hoursis%d\n and pay is %f\n",h,pay); +} +else +{ +pay=0; +printf("no of hours work is less than 40 and overtime pay is zero"); +} + +} +}