%-------------------------------------------------------------------------------
% lecture8b
%-------------------------------------------------------------------------------
  clear
% more on
  more off
  clc
  echo on
% echo off
%-------------------------------------------------------------------------------
% repetition (well, a bit of updating)

% set up input
i=1
g = input('enter grade: ')

% perform repetitive task until
% user enters a negative value
while g > -eps
 grades(i) = g
 i = i+1 
 g = input('enter grade: ')
end
if i > 0
 grades
else
 disp(['no grades entered!'])
end
% 
