Quick actions

cmd+k|ctrl+k

Navigation

Languages

Задание 72

Snippet info

Language

Cpp

Visibility

public

Author

romanov

Created

2018-12-20T19:23:39Z

Updated

2018-12-20T19:23:39Z

#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;

int main()
{
  setlocale(LC_ALL, "Rus");
  int d,c,sum,t,r,f;
  const int n = 5;
  int a[n];
  cout << " Введите элементы массива:" << endl;
  for (int i = 0; i < n; i++)
  {
    cin >> f;
    a[i] = f;
    
  }
  cout << endl;
  d = a[0];
  r = a[3];
  sum = 1;
  a[n] == d;
  if (r < d) 
  {
    cout << "Ошибка";
  }
  else
  {
    for (int i = 0; i < n + 1; i++)
    {
      t = a[i];
      if (a[i] > d && a[i] < r)

        sum = sum *= t;
      
    }
    c = sum;
    cout << c << endl;
  }
  
  
}
INFO