#include <iostream> #include <cmath> using namespace std; void main(){ double result ; int x,n=0,k = 2; cin >> x >> n; result = cos(pow(x, 1)); for (int i = 2;i<=n;++i) { if (i != k) result += cos(pow(x, i)); else { result -= cos(pow(x, i)); k += 3; } } cout << "result = " << result; system("pause"); }
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota
Оформи подписку