Question: Problem : Write a program, which evaluates the following expression as real value: x = 1 - 1 / 2 + 1 / 4 -
Problem : Write a program, which evaluates the following expression as real
value:
x = 1 - 1 / 2 + 1 / 4 - 1 / 6 +1 / 8 - 1 / 10 - . .
The main program allows the user to input an integer for accuracy (number of terms). The main program must use while loop structure and prints answer up to two-digits after the decimal point.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
