problem in C++ program

hey guys !
i am having a problem to write C++ program plz help me to solve it.

Write a program that sums the first n items in a geometric series using a while loop.
User will input the n. use the following formula or use your previous knowledge.
a+ar+ar2 +ar3 +…, with r=1/2 and a=1/2
So far, the only problem is lack of effort on your part.
http://www.catb.org/esr/faqs/smart-questions.html#homework

We're your guides, not your mules.

If you want help, you need to make an effort and then ask a question about the code you have.

Not just be a copy/paste interface between us and your tutor.
or use your previous knowledge
Break out your algebra book and find the formula for evaluating a geometric series. You'll find that you don't need a loop at all.
Topic archived. No new replies allowed.