% LOOPS
% accumulation: process grades, find average

% g <- grade
% n <- number of grades
% t <- sum of grades


n = 0;
t = 0;

g = input('enter number: ');

while g ~= -1

	n = n + 1;
	t = t + g;

	g = input('enter number: ');
end

if n == 0
	fprintf('no values\n');
else
	fprintf('%f\n', (t/n));
end
