01: #include <iostream>
02: #include <vector> 
03: using namespace std;
04: 
05: int main()
06: {  vector<double> salaries;
07:    bool more = true;
08:    while (more)
09:    {  double s;
10:       cout << "Please enter a salary, 0 to quit: ";
11:       cin >> s;
12:       if (s == 0) more = false;
13:       else salaries.push_back(s);
14:    } 
15:    double highest = salaries[0];
16:    int i;
17:    for (i = 1; i < salaries.size(); i++)
18:       if (salaries[i] > highest)
19:          highest = salaries[i];
26: 
20:    for (i = 0; i < salaries.size(); i++)
21:    {  if (salaries[i] == highest) 
22:          cout << "highest value => ";
23:       cout << salaries[i] << "\n";
24:    } 
25:    return 0;
26: }