clc
clear
disp 'Aliyanna Ellis'

k = 0;
s = 0;

while s <= 10000
k = k + 1;
s = s + 3^k;
end

k
s

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: