Find the value of the expression. Sample input: 2.4 -4.2 0.6 Sample output 4,726
In the course of doing something wrong. I have no idea how to count sigma. Please help, how should it be right?
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { double a,b,x,p,sum=0,n; cin >> a >> b >> x; n=10*x; for (int i=n;i<(-10*b);i++) { sum+=(pow((-1),(n+1))*pow(n,1.0/2.0))/(n*(n+2)); } p=b/2*x; p=cos(p)/sin(p); p=pow(p,3)*sum; p=p+pow((abs(1-x*exp(xb))),1.0/3.0); cout << fixed << setprecision(3) << p; return 0; } 

