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 PandaScotlandFlag
- {
- static void Main()
- {
- int N = int.Parse(Console.ReadLine());
- //char[] letters = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'}
- // 65-90
- int currentLetter = 65;
- for (int i = 0; i < N/2; i++)
- {
- if (currentLetter == 91)
- {
- currentLetter = 65;
- }
- char ch1 = (char)currentLetter;
- char ch2 = (char)(currentLetter + 1);
- if (currentLetter + 1 == 91)
- {
- ch2 = (char)65;
- currentLetter = 64;
- }
- currentLetter += 2;
- Console.WriteLine("{0}{1}{2}{3}{0}", new string('~', i), ch1, new string('#', N - 2 - 2*i), ch2);
- }
- Console.WriteLine("{0}{1}{0}", new string('-', N/2), (char)currentLetter);
- currentLetter++;
- for (int i = 0; i < N/2; i++)
- {
- if (currentLetter == 91)
- {
- currentLetter = 65;
- }
- char ch1 = (char)currentLetter;
- char ch2 = (char)(currentLetter + 1);
- if (currentLetter + 1 == 91)
- {
- ch2 = (char)65;
- currentLetter = 64;
- }
- currentLetter += 2;
- Console.WriteLine("{0}{1}{2}{3}{0}", new string('~', (N - 3 - 2*i)/2), ch1, new string('#', 2*i + 1), ch2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement