Hi. I had to make a new profile. The other one was not letting me log in or change my pw. Anyway, this is what I have done so far
Code:
#include <stdio.h>
#include <stdlib.h>
main(){
double ovr = 4.0, grossOvrPay, regPay, hrs, rte = 8;
printf ("How many hours did you work this week?\n");
scanf ("%lf", &hrs);
if (hrs <= 40)
{
printf("You have no overtime.\n");
}
else
if (hrs > 40)
grossOvrPay = (hrs - 40) * rte + ovr + 320;// + $320 is total pay of 40hrs *8//
printf ("Your gross pay is: %lf\n", grossOvrPay);
system("pause");
}
Im having trouble defining what the time and a half should be, the arithmetic gives me the wrong answer anything after 42hrs i believe. I feel that I am so close. But im out of ideas. any input you might have Ill greatly appreciate it