Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Task3
- {
- class Task3
- {
- static void Main(string[] args)
- {
- int s;
- int i = 1;
- string result="";
- while (int.TryParse(Console.ReadLine(),out s))
- {
- int e = int.Parse(Console.ReadLine());
- string line = Console.ReadLine();
- int movPos;
- if (i % 2 == 0)
- {
- movPos = 4;
- }else
- {
- movPos = 3;
- }
- if (s < 0)
- {
- s += line.Length;
- }
- if (e < 0)
- {
- e += line.Length;
- }
- while (s <= e)
- {
- result+=line[s];
- s += movPos;
- }
- i++;
- }
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement