Write a mobile app (using TouchDevelop) that calculates
the sum (which computes e×) of n + 1 terms as
sum = 1 + x/ 1! + /2! + / 3! + /4! + …
Values x and n should be read (prompted to enter). Calculate each sequential term base on the previous one to get the best calculation performance (so, the next one = the previous term * (x / i) where i the current control variable – index). Don’t use the math function. Use only one loop. The output should be in the table format as follows (remember to use the reverse wall order shown in class):
x = ?, n = ?
iteration # termValue sum
…
Example:
x = 1, n = 2
iteration # termValue sum
1 1 2
2 0.5 2.5
e× = 2.71828…, where x = 1
Each row corresponds to values in each iteration except the last row which should give the final result in the text box (see p.38 ch3 of our text [3] and also the last exercise in class). A very last line of the output should give the return value of e× from the formula exp(x : Number) : Number (see p.186 of our text).
Test for x = 1, n = 5 and n = 10 – the expected result should be better for n = 10 and you will expect the sum around 2.71828…. Next test for x = 2, n = 5, and n = 10.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more