% Prompt User for input
temperature = input ( 'Enter temperature:');

% Rate temperature
while temperature >= 49 & temperature < 100

  % Initial rating
  if temperature >= 90
	rating = 'hot';
  elseif temperature >= 80
	rating = 'warm';
  elseif temperature >= 70
	rating = 'ok';
  elseif temperature >= 60
	rating = 'cool';
  else
	rating ='cold';
  end

  % Modify rating according to specific temperature range
  remainder = mod(temperature, 10);
  if temperature >= 80
     if remainder < 3
	rating = strcat('almost', rating);
     elseif remainder > 6
	rating = strcat('very', rating);
     end

  elseif temperature <=69
     if remainder < 3
	rating = strcat('very', rating);
     elseif remainder >6
	rating = strcat('almost', rating);
     end
  end

  % Print results
  output = strcat ( 'The temperature is', rating, '.')
  disp(output)
  temperature = input ('enter temperature: ');

end
