Alex C.

asked • 09/30/17

Very confused on how to write this program ?

Hi, Im freaking out because Im not sure how to write this program. :
 
Use a for loop to compute the following sequence of numbers that are an
approximation of √
2. The sequence depends on a starting value x0 = 1. The following values
in the sequence are then calculated as follows:
xi+1 = xi/2 + 1/xi
. (1)
For example x1 = 3/2 and x2 = 17/12. The program has to compute n terms of the
approximation, where n is the Byte variable set by the user. The last term xn is then
displayed in the Label control.
 
I have no idea how to write such a program when sequences are involved! So far all I know is doing simple calculators that add/multiply numbers. Please help !!

Michael J.

What programming language?
Report

09/30/17

Alex C.

Visual Basic
Report

09/30/17

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.