Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace _11ArrayManipulator
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] arrayNumbers = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- string command = string.Empty;
- while ((command = Console.ReadLine()) != "end")
- {
- string[] tokens = command.Split(' ');
- switch (command)
- {
- case "exchange":
- Exchange(arrayNumbers);
- break;
- case "max even":
- MaxEven();
- break;
- case "max odd":
- MaxOdd();
- break;
- case "min even":
- MinEven();
- break;
- case "min odd":
- MinOdd();
- break;
- }
- if (command.StartsWith("first") && command.EndsWith("even")) // count чета в метода долу
- {
- FirstEven(int.Parse(tokens[1]));
- }
- else if (command.StartsWith("first") && command.EndsWith("odd")) // count чета в метода долу
- {
- FirstOdd(int.Parse(tokens[1]));
- }
- else if (command.StartsWith("last") && command.EndsWith("even")) // count чета в метода долу
- {
- LastEven(int.Parse(tokens[1]));
- }
- else if (command.StartsWith("last") && command.EndsWith("odd")) // count чета в метода долу
- {
- LastOdd(int.Parse(tokens[1]));
- }
- }
- }
- private static void Exchange(int[] arrayNumbers)
- {
- int index = int.Parse(Console.ReadLine());
- int[] splittedArray = null;
- for (int i = 0; i < index; i++)
- {
- arrayNumbers[i] = splittedArray[i];
- }
- }
- private static void MaxEven()
- {
- //throw new NotImplementedException();
- }
- private static void MaxOdd()
- {
- //throw new NotImplementedException();
- }
- private static void MinEven()
- {
- //throw new NotImplementedException();
- }
- private static void MinOdd()
- {
- //throw new NotImplementedException();
- }
- private static void FirstEven(int count)
- {
- }
- private static void FirstOdd(int count)
- {
- }
- private static void LastEven(int count)
- {
- }
- private static void LastOdd( int count)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment