Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char id[10]; //right
- int hour, amtex; //right
- float salaryperhour, salaryperhourex, salary;
- printf("The employees ID:"); //right
- scanf("%s", id);
- printf("the hour worked:"); //right
- scanf("%d", &hour);
- printf("the salaryperhour:"); //right
- scanf("%f", &salaryperhour);
- printf("the salaryperhourex:"); //right
- scanf("%f", &salaryperhourex);
- salary = salaryperhour*hour;
- printf("totalofsalary: $%.2f \n", salary);
- if (hour >= 35)
- {
- amtex = hour - 35;
- salary = salaryperhour*hour + salaryperhourex*amtex;
- printf("totalofsalary: $%.2f ",salary);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement