Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 14.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include "iostream"
- using namespace std;
- int main()
- {
- double a, b, c, d, kids;
- cout << "Enter an employee's salary per hour ";
- cin >> a;
- cout << "Enter the number of hours he worked in the current week ";
- cin >> b;
- cout << "How many kids does he have: ";
- cin >> kids;
- {
- if (kids > 2 && b > 40)
- const double c = b-40*(a*1.5)+40;
- cout << "His weekly salaty is: " << c-(c*6/100)+(c*14/100)-10-35;
- }
- {
- if (kids <= 2 && b > 40)
- const double c = b-40*(a*1.5)+40;
- cout << "His weekly salaty is: " << c-(c*6/100)+(c*14/100)-10;
- }
- {
- if (kids <= 2 && b <= 40)
- const double d = a*b;
- cout << "His weekly salaty is: " << d-(d*6/100)+(d*14/100)-10;
- }
- {
- if (kids > 2 && b <= 40)
- const double d = a*b;
- cout << "His weekly salaty is: " << d-(d*6/100)+(d*14/100)-10;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement