Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class Program
- {
- static void printDNA(char firstLetter)
- {
- }
- static void Main(string[] args)
- {
- int howManyLines = Int32.Parse(Console.ReadLine()); ;
- char firstLetter = char.Parse(Console.ReadLine());
- bool up = true, down = false;
- bool restart = false;
- char[] Tletters = {'o','A', 'B', 'C', 'D', 'E', 'F', 'G'};
- int index = Array.IndexOf(Tletters, firstLetter);
- int counter = 1;
- for (int i = 0; i < howManyLines; i++)
- {
- Console.Write("{0}", new string('.', (7 - counter) / 2));
- for (int j = 0; j < counter; j++)
- {
- string format = Tletters[index].ToString();
- Console.Write(format);
- ;
- index++;
- if (index > 7)
- {
- index = index % 7;
- }
- }
- Console.Write("{0}", new string('.', (7 - counter) / 2));
- if (counter <= 5 && down == false)
- {
- up = true;
- }
- else if (counter == 7)
- {
- down = true;
- }
- Console.WriteLine();
- if (restart == true)
- {
- counter -= 2;
- restart = false;
- }
- if (counter < 7 && up && down == false)
- {
- counter += 2;
- }
- else if (down)
- {
- counter -= 2;
- if (counter == 1)
- {
- down = false;
- up = true;
- restart = true;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement