#include <iostream>
#include <cmath>
using namespace std;
signed main()
{
double pr = 1, n, x;
cin >> n >> x;
for(int k = 1; k <= n;k++){
pr *= (1.0+sin(k*x))/k;
}
cout << pr << endl;
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <cmath>
using namespace std;
signed main()
{
double pr = 1, n, x;
cin >> n >> x;
for(int k = 1; k <= n;k++){
pr *= (1.0+sin(k*x))/k;
}
cout << pr << endl;
return 0;
}