1. homework 1a (12.09) - Syerikgul/Homeworks GitHub Wiki

#include

int main() { double x; int N; std::cout << "Input x:"; std::cin >> x;

do {
    std::cout << "n:";
    std::cin >> N;
} while (N < 1);

double S = 0, ak = x;
for (int k = 0; k <= N; ++k) {
    S += ak;
    ak *= (-1) * x * x / (2 * k + 2) / (2 * k + 3);
}
std::cout << "S1=" << S << std::endl;

}

⚠️ **GitHub.com Fallback** ⚠️