% sum_100.m
%
%  Find the first integer K so that the sum 1+2+3+...+K >= 100.
%
sum = 0;
k = 0;
while ( sum < 100 )
  k = k + 1;
  sum = sum + k;
end
fprintf ( '  1+2+3+...+%i = %i >= 100\n', k, sum );

