% ave10
% Average 10 numbers from user input

n= 10; % number of data values
total= 0; % current sum (initialized to zero)
for k = 1:1:n
% read and process input value
num= input('Enter a number: ');
total= total + num;
end
avg= total/n; % average of n numbers
fprintf('Average is %f\n', avg)