Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab6(72)

Snippet info

Language

Cpp

Visibility

public

Author

misha127831

Created

2018-12-20T17:10:49Z

Updated

2018-12-20T17:10:49Z

#include <iostream>

#include <clocale>
using namespace std;
 
int main()
{
    setlocale(LC_ALL, "RUS");
    const int N = 15; 
    int mas[N] = { 5, -12, -12, 9, 10, 0, -9, -12, -1, 23, 65, 64, 11, 43, 39 }; 
 
    cout << "Задан массив: {";
    for (int i=0; i < N; i++)
        cout << mas[i] << " ";
    cout << "}" << endl;
 
    int a; 
    long long x = 1;
    cout << "Введите число А: ";
    cin >> a;
 
    for (int i=0; i<N; i++)
    {
        if (mas[i] > a) 
            x *= mas[i];
    }
 
    cout << "Произведение чисел, больших А = "<< x << endl;
 
    return 0;
}
INFO