Preview:
#include <iostream>
#include <algorithm>

using std::cout;
using std::cin;
using std::endl;
 
int main() 
{
  int a;
  int b;
  int c;
  int calculate = 1;
  int ArithmeticMean;
  int difference;

  cout << "Зарплата " << calculate << "-го сотрудника: ";
  calculate++;
  cin >>a;
  cout << "Зарплата " << calculate << "-го сотрудника: ";
  calculate++;
  cin >>b;
  cout << "Зарплата " << calculate << "-го сотрудника: ";
  calculate++;
  cin >>c;
  ArithmeticMean = (a+b+c)/3;
  
  int high = 0;
  if(a > b ) 
  {
    cout << "Самая высокая зарплата у 1-го сотрудника: "  << a << endl;
    high = a;
  } 
  else if(b < a) 
  {
    cout << "Самая высокая зарплата у 2-го сотрудника: "  << b << endl;
    high = b;
  }
  else if(c > b)
  {
    cout << "Самая высокая зарплата у 3-го сотрудника: "  << c << endl;
    high = c;
  }

  
  int low = 0;
  if(a < b ) 
  {
    cout << "Самая низкая зарплата у 1-го сотрудника: "  << a << endl;
    low = a;
  } 
  else if(b > a ) 
  {
    cout << "Самая низкая зарплата у 2-го сотрудника: "  << b << endl;
    low = b;
  }
  else if(c < b)
  {
    cout << "Самая низкая зарплата у 3-го сотрудника: "  << c << endl;
    low = c;
  } 
 
  difference = high - low;
  
  cout << "Разница между высокой и низкой зарплаты составляет: " << difference << endl;
  cout << "Средняя зарплата отдела является: " << ArithmeticMean;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter