Решение на упр.01 задача 1 от Надя Йотова
Резултати
- 1 точка от тестове
- 0 бонус точки
- 1 точка общо
- 0 успешни тест(а)
- 0 неуспешни тест(а)
Код
fn optimize_temperature(room_temp : i32, eco_mode_level : i32) -> i64{
if eco_mode_level >2{
(room_temp - 3) as i64
}else{
(room_temp + 1) as i64
}
}
fn main() {
let mut current_temp=21;
current_temp += 2;
let current_temp = optimize_temperature(current_temp, 3);
println!("{}",current_temp);
}
