Lab5 (38)
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
float n; //n - натуральное число
float S=0; //сумма прогресии
cout << "Введите число" << endl;
cin >> n;
cout << endl;
for (int i = 1; i < n; i++)
{
S += (1 / pow((2 * n + 1), 2));
cout << S << endl;
S += S;
}
cout << endl <<"Результат - "<< S << endl;
}INFO