YCP Logo Lab 6: Series Sum

Series Sum

Consider the following mathematical series:

1/2 + 1/4 + 1/8 + 1/16 + 1/32 + ...

If we continue this series to an arbitrary number of terms, the sum will approach 1.

Getting Started

If you have a solution open in Visual Studio, close it (File->Close Solution).

Download CS200_Lab6.zip. Import it into Visual Studio (File->Import...).

Add your code to the source file called Series.c.

Your Task

Write a program to compute the sum of the first 7 terms in this series and print the result.

The output of your program should look something like the following:

sum is 0.992249


The first 7 powers of two are 2, 4, 8, 16, 32, 64, and 128.


When you are done, choose Tools->Submit to submit your completed lab to the server. You will need to enter your Marmoset username and password.

If the Tools->Submit option does not work, create a zip file containing the files in your project, and upload it to the submission server as lab6. The server URL is