function s = myExample(n)
% function s = myExample(n)
% Purpose: runs basic MATLAB commands to simulate user code for a standalone demo
%       n: size of simple arithmetic sequence [1+2+3+ . . . +n]

s = 0;    % initialize solution 
for i=1:n
    s = s + i;       % s = 1 + 2 + 3 + . . . + n
end
fprintf(1,'\n\n Iteration count n = %d\n', n);
fprintf(1,'\nComputed s = %d   ;  Expected s =  %d \n\n', s, n*(n+1)/2);

end   % end of function 

