% Prompt the user
disp(['Enter 7 temperatures:']);

% Get seven temperature values
for i=1:7
    temperature(i) = input('');
end

% Calculate the sum of all seven temperatures
sumTemp = sum(temperature);
 
% But actually.. we don't need to do this
% Calculate the average directly
avgTemp = mean(temperature);

disp(['The average temperature is ' num2str(avgTemp)]);
disp(['The temperatures are']);
 
for i=1:7
  if temperature(i) < avgTemp
     disp([num2str(temperature(i)) ': below average.']);
  elseif temperature(i) > avgTemp
     disp([num2str(temperature(i)) ': above average.']);
  else
     disp([num2str(temperature(i)) ': the average.']);
  end
end

disp(['Have a nice week.']);
