Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. #include<iomanip>
  4. using namespace std;
  5. class Employee
  6. {
  7. public:
  8. Employee(string first,string last, double hours,double salary)
  9. {
  10. name.first=first;
  11. name.last=last;
  12. work.hours=hours;
  13. work.salary=salary;
  14. }
  15. double FindAllSalary()
  16. {
  17. double result = work.hours*work.salary;
  18. return result;
  19. }
  20. private:
  21. struct
  22. {
  23. string first;
  24. string last;
  25. }name;
  26. struct
  27. {
  28. double hours;
  29. double salary;
  30. }work;
  31.  
  32. };
  33.  
  34. int main()
  35. {
  36. Employee employee("Ivan","Ivanov",8,20);
  37. cout<<employee.FindAllSalary();
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement