%Author: Terry Harvey CISC 106 Section 99, TA: James Jamerson

%Description: Script M-file for testing the sumInts function examples. Uses
%the fact that the sum of integers from one to n is equal to n * (n+1) / 2

if (sumInts(3) ~= (3*4/2))
  disp('error calculating sumInts(3)');
elseif (sumInts(10) ~= 10*11/2)
  disp('error calculating sumInts(10)');
elseif (sumInts(300) ~= 300*301/2)
  disp('error calculating sumInts(300)');
else
  disp('sumInts function passed');
end
