You are on page 1of 1

Numerical Methods

3. The cosine function can be evaluated by the following infinite series:

Write an algorithm to implement this formula so that it computes and prints out the values of
as each term in the series is added. In other words, compute and print in sequence the values for

up to the order term

of your choosing. Write the algorithm as a well-structured pseudocode.

4. The divide and average method, an old-time method for approximating the square root of any
positive number can be formulated as

Write a well-structured pseudocode for the implementation of this algorithm. It should do the
following:

Allow for a user input .Check whether the user input is valid. Display when the input is or
not valid.
Set a value of tolerance. The tolerance must ensure that the answer is correct to six decimal
places
Implement the formula. Repeat the calculation until the answer is correct to six decimal places.
Display the answer.

5. Write a well-structured pseudocode that will compute the factorial of an input integer. Make sure
that the algorithm includes checks on valid values, as well as a correct output for .

Machine Problem No.1 Development of Algorithms using MS Excel VBA and MathScript

Page 2

You might also like