Сколько гулять ?


#1
var temperature = 20;
var idealTemperature = 20;
var itsRaining;
var minutes = 20;

if (itsRaining || temperature < 0 || temperature > 35) {
  minutes = 0;
  } else if (temperature == idealTemperature) {
    minutes = 20;
    } else if (temperature >= idealTemperature) {
       minutes = Math.abs(minutes - (temperature - idealTemperature));
      } else if (temperature <= idealTemperature) {
       minutes = Math.abs(minutes - (temperature + idealTemperature)) ;
      }