#include <iostream>
#include <conio.h>
#include <locale>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
size_t arraySize;
cout << "Количество элементов: ";
cin >> arraySize;
double* array = new double[arraySize];
double sum = 0;
for (size_t i = 0; i < arraySize; ++i) {
double value;
cout << i << ": ";
cin >> value;
array[i] = value;
sum += value;
}
cout << "Массив из " << arraySize << " элементов:" << endl;
for (size_t i = 0; i < arraySize; ++i)
cout << "\t[" << i << "]: " << array[i] << endl;
cout << "Произведение элементов: " << sum << endl;
delete[] array;
_getch();
return 0;
#include <iostream>
#include <conio.h>
#include <locale>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
size_t arraySize;
cout << "Количество элементов: ";
cin >> arraySize;
double* array = new double[arraySize];
double sum = 0;
for (size_t i = 0; i < arraySize; ++i) {
double value;
cout << i << ": ";
cin >> value;
array[i] = value;
sum += value;
}
cout << "Массив из " << arraySize << " элементов:" << endl;
for (size_t i = 0; i < arraySize; ++i)
cout << "\t[" << i << "]: " << array[i] << endl;
cout << "Произведение элементов: " << sum << endl;
delete[] array;
_getch();
return 0;
}