clc; clear all;

s = 0; n = 0;

while s<=0.999
    n=n+1;
    s = s + 1/(2^n), pause(0.5)
end

