a = 0; b = 0; i = 1; j = 1; while a < 5 b = a; a = a + 1/i; j = i; i = i + 1; disp(b) disp(j) end