Untitled
twetwAnonymous
c_cpp
11/09/2023 10:10 AM
496 B
13
Indexable
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "russian");
int a, n, sum = 0;
cout << "Сколько чисел вы хотите ввести:";
cin >> n;
for (int i = 0; i < n; i++)
{
cout << "Введите число:";
cin >> a;
sum += a;
}
cout << (double)sum / n;
}Editor is loading...