#include<stdio.h>
#include<conio.h>
#define p printf
#define s scanf
int main()
{
int hw, hr, pong;
p("Enter hours worked for the week:");
s("%d",&hw);
p("Enter the hourly rate:");
s("%d",&hr);
if(hw > 45)
{
pong = (hw * hr) - 500;
}
else
{
if (hw > 40 && hw <= 45)
pong = (hw * hr) - 250;
}
{
if(hw > 35 and hw <=40)
pong = (hw * hr) - 150;
p("\nYour Total salary is %d",pong);
}
getch();
return 0;
}
#include<conio.h>
#define p printf
#define s scanf
int main()
{
int hw, hr, pong;
p("Enter hours worked for the week:");
s("%d",&hw);
p("Enter the hourly rate:");
s("%d",&hr);
if(hw > 45)
{
pong = (hw * hr) - 500;
}
else
{
if (hw > 40 && hw <= 45)
pong = (hw * hr) - 250;
}
{
if(hw > 35 and hw <=40)
pong = (hw * hr) - 150;
p("\nYour Total salary is %d",pong);
}
getch();
return 0;
}
0 comments:
Post a Comment