Программа:
С++:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float S, x; int i;
cout << "x = "; cin >> x;
for(i = 0; i <= 20; i += 2) {
S += pow(x, i) / (i + 2);
}
cout << S;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Программа:
С++:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float S, x; int i;
cout << "x = "; cin >> x;
for(i = 0; i <= 20; i += 2) {
S += pow(x, i) / (i + 2);
}
cout << S;
}