2.10.2. Complex Formulas

Demonstrates pow function, symbols of inclusion, unary minus

\[B = R \left[ { {1 - (x + 1) (1 + i)^{-(n-x)} } \over { 2i - 1} } \right] \]
Complex formula practice problem. Write a program that calculates the value for B as specified in the following formula. All variables are type double.
  1. B
  2. R
  3. x
  4. i
  5. n
Prompt the user to the enter the variables 2 - 5 in that order. Print the value of B at the end of the calculation.