#include <cmath>
#include <iostream>
using namespace std;
double product(int a, int i, const int n) {
auto p = 1.0;
if (n < i) return 0.0;
while (i <= n) {
p *= sqrt(abs(sqrt(a / sqrt(abs(i))) - i)) / exp(3 * a - i);
++i;
}
return p;
}
double sum(int i, int j, const int n, const int m) {
auto s = 0.0;
if (n < i) return s;
while (i <= n) {
s += sin(i) * product(i, j, m);
++i;
}
return s;
}
int main() {
auto a = 5;
auto b = -10;
const auto n = 10;
const auto m = -5;
const auto y = sum(a, b, n, m);
cout << "result: " << y << '\n';
}