Question: Use C++ only Do not use any concepts beyond Chapter 5 of textbook Do not put any arithmetic expressions in cout statements. Problem 1: Prompt
Use C++ only
Do not use any concepts beyond Chapter 5 of textbook
Do not put any arithmetic expressions in cout statements.
Problem 1: Prompt the user to enter a whole number for the power used in the last element of the series (n) and a floating point number for x. The user should be able to enter a positive or negative number for n. When the user enters a positive number for n the series
1 + x + x2 + x3 + x4 .......... + xn should be calculated and when the user enters a negative number for n the series
1 + 1/x + 1/x2 + 1/ x3 + 1/x4 .......... + 1/xn
should be calculated.
Output the sum of the series.
Do not use the pow function or create your own function for exponentiation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
