Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int n;
- double x, a, b;
- cout << "Enter N: "; cin >> n;
- cout << "Enter X: "; cin >> x;
- cout << "Enter A: "; cin >> a;
- cout << "Enter B: "; cin >> b;
- double q=1;
- for (int i=1; i<=n; i++)
- q*=(i*a+x)/(i*b+x);
- cout << q;
- }
Add Comment
Please, Sign In to add comment