for loop help
I don't want the answer, just some direction.
Consider the sum 1/2 + 1/4 + 1/8 + ? The first term of this sum is 1/2 = .5. The second term is 1/2 + 1/4 = .75. The third term is 1/2 + 1/4 + 1/8 = .875. Create a program that repeatedly prompts the user for a positive integer, n. Then have the program calculate the nth term of the above sum as a decimal and display it to the user. For example, if the user enters 4, then your program must compute 1/2 + 1/4 + 1/8 + 1/16 = .9375. If the user enters 0, then exit from the program.
I know I need to use a for loop, but I am a little confused

