Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace _02.Icarus
- {
- using System;
- using System.Collections.Generic;
- using System.Linq;
- public class Icarus
- {
- public static void Main()
- {
- var input = Console.ReadLine();
- while (input != "Hornet is Green")
- {
- var index= input.IndexOf("<->");
- var left = input.Substring(0, index);
- var right = input.Substring(index+5);
- if (left.ToCharArray().All(l => char.IsDigit(l)) &&
- right.ToCharArray().All(r => char.IsLetterOrDigit(r)))
- {
- for (int i = index; i > 0; i--)
- {
- left = left[i].ToString();
- }
- Console.WriteLine(left);
- Console.WriteLine(right);
- }
- input = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement