Advertisement
Guest User

plus

a guest
Dec 15th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. if (input == '3')
  2.             {
  3.                 cout << "Total salary for a given year and a given SSN" << endl;
  4.                 string sendInSSN;
  5.                 cout << "Input SSN: ";
  6.                 cin >> sendInSSN;
  7.                 vector<Employee> temp = employee_sevice.testing(sendInSSN);
  8.                 double sum = 0;
  9.  
  10.                 for (int i = 0; i < temp.size(); i++)
  11.                 {
  12.                     sum+= temp[i].get_salary();
  13.                 }
  14.                 cout << sum << endl;
  15.  
  16.                 if (temp.size() == 0){
  17.                 cout << "No employee with that SSN, unfortunately " << endl;
  18.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement