Search for question
Question

1. Recall the convergent series from Part #1: 1 1 1 1 1+5+52 +53 For this problem, write a script that performs the following: 1. Prompt the user for input in the form of the number of terms to compute. Check for valid input, and loop until the user enters a positive number greater than zero. If an invalid number is entered, display a message reminding the user to enter a positive integer. 2. Use fprintf to output to the command window each term. See below for an example of what I would like for the formatted output. Also, output to the command window the total as well as the number of terms, as shown below. + = 5|4 Example of the user entering 5 (five terms): >> Enter number of terms to compute: 5 1.000+ 0.200+ 0.040 +0.008 +0.002 = 1.250, number of terms = 5 Specify three decimal places for each term and the total, and no decimal places for the number of terms.

Fig: 1