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.Numerics;
- using System.Threading.Tasks;
- class ProgrammerDNA
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- char letter = char.Parse(Console.ReadLine());
- char[] letters = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' };
- int dots = 3;
- int letterIndex = 0;
- if(letter == 'A')
- {
- letterIndex = 0;
- }
- else if (letter == 'B')
- {
- letterIndex = 1;
- }
- else if (letter == 'C')
- {
- letterIndex = 2;
- }
- else if (letter == 'D')
- {
- letterIndex = 3;
- }
- else if (letter == 'E')
- {
- letterIndex = 4;
- }
- else if (letter == 'F')
- {
- letterIndex = 5;
- }
- else if (letter == 'G')
- {
- letterIndex = 6;
- }
- bool increasing = true;
- for(int i = 0;i<n;i++)
- {
- Console.Write(new string('.', dots));
- for (int p = 0; p < 7 - dots * 2;p++)
- {
- Console.Write(letters[letterIndex]);
- if (letterIndex < 6)
- {
- letterIndex++;
- }
- else if (letterIndex == 6)
- {
- letterIndex = 0;
- }
- }
- Console.Write(new string('.', dots));
- Console.WriteLine();
- if(increasing && dots>0)
- {
- dots--;
- }
- else if(increasing && dots==0)
- {
- increasing = false;
- dots++;
- }
- else if(!increasing && dots<3)
- {
- dots++;
- }
- else if(!increasing && dots == 3)
- {
- increasing = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement