import ‘dart:io’; void main() { const int min = 15; const int max = 30; bool light = false; int temp = 20; bool security = false; String? choice; while (choice != “5”) { print("\n1- Lights"); print("2- Thermostat"); print("3- Security"); print("4- Status"); print("5- Exit"); stdout.write("Enter number: "); choice = stdin.readLineSync(); if (choice == "1") { stdout.write("Type on or off: "); String? answer = stdin.readLineSync(); if (answer == "on") { light = true; } else if (answer == "off") { light = false; } else { print("Wrong input"); } } else if (choice == "2") { stdout.write("Enter temperature: "); int? newTemp = int.tryParse(stdin.readLineSync() ?? ""); if (newTemp != null) { if (newTemp >= min && newTemp <= max) { temp = newTemp; } else { print("Temperature must be between 15 and 30"); } } } else if (choice == "3") { stdout.write("Type arm or disarm: "); String? sec = stdin.readLineSync(); if (sec == "arm") { security = true; } else if (sec == "disarm") { security = false; } } else if (choice == "4") { print("Light: ${light ? "ON" : "OFF"}"); print("Temperature: $temp"); print("Security: ${security ? "ARMED" : "DISARMED"}"); if (temp % 3 == 0 && temp % 5 == 0) { print("Perfect Day"); } else if (temp % 3 == 0) { print("Cool Day"); } else if (temp % 5 == 0) { print("Warm Day"); } } } print(“Program ended”); }