public static void Main() { var phone = new Smartphone(); var numbers = Console.ReadLine().Split(); var sites = Console.ReadLine().Split(); foreach (var number in numbers) { Console.WriteLine(phone.Dial(number)); } foreach (var url in sites) { Console.WriteLine(phone.Browse(url)); } }
static void Main(string[] args) { var numbers = Console.ReadLine().Split(" ").ToArray(); var smartphone = new Smartphone(); foreach (var number in numbers) { Console.WriteLine(smartphone.Call(number)); } var urls = Console.ReadLine().Split(" ").ToArray(); foreach (var url in urls) { Console.WriteLine(smartphone.Browse(url)); } }
static void Main(string[] args) { var phoneNumbers = Console.ReadLine().Split(); var urls = Console.ReadLine().Split(); var smartphone = new Smartphone(); foreach (var phoneNumber in phoneNumbers) { Console.WriteLine(smartphone.Call(phoneNumber)); } foreach (var url in urls) { Console.WriteLine(smartphone.Browse(url)); } }
static void Main() { var smartphone = new Smartphone(); var phoneNumbers = Console.ReadLine().Split(); foreach (var number in phoneNumbers) { smartphone.Call(number); } var websites = Console.ReadLine().Split(); foreach (var site in websites) { smartphone.Browse(site); } }
public static void Main() { string[] numbers = Console.ReadLine() .Split(" "); string[] sites = Console.ReadLine() .Split(" "); Smartphone smartphone = new Smartphone(); for (int i = 0; i < numbers.Length; i++) { smartphone.AddNumber(numbers[i]); } for (int i = 0; i < sites.Length; i++) { smartphone.AddSite(sites[i]); } Console.WriteLine(smartphone.Call()); Console.WriteLine(smartphone.Browsing()); }