You are given an array F (9). Find and display the sum and product of the elements of this array.

Solving a problem in C ++

#inlcude <iostream>
#include <ctime>
using namespace std;
void main ()
{
setlocale (LC_ALL, “rus”);
srand (time (0));
int const N = 9;
int F [N], sum = 0, proiz = 1;
cout << “Array elements:” << endl;
for (int i = 0; i <N; i ++)
{
F [i] = rand ()% 10 + 1;
cout << F [i] << “”;
sum + = F [i];
proiz * = F [i];
}
cout << endl << “Sum of array elements:” << sum << endl << “Product of array elements:” << proiz << endl;
system (“pause”);
}



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.