Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PandaScotlandFlag
- {
- class PandaScotlandFlag
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- char printChar = 'A';
- char lastChar = ' ';
- if(n == 1)
- {
- Console.WriteLine(printChar);
- }
- for(int i = 0; i < (n - 1)/2; i++)
- {
- string diez = new string('#', n - 2 - 2 * i);
- string sym = new string('~', i);
- Console.Write(sym);
- Console.Write(printChar);
- if(printChar == 'Z')
- {
- printChar = 'A';
- }
- else
- {
- printChar++;
- }
- Console.Write(diez);
- Console.Write(printChar);
- if(printChar == 'Z')
- {
- printChar = 'A';
- }
- else
- {
- printChar++;
- }
- Console.Write(sym);
- Console.WriteLine();
- lastChar = printChar;
- }
- string dash = new string('-', (n - 1) /2);
- Console.WriteLine(dash + lastChar + dash);
- lastChar++;
- for(int i = 0; i < (n - 1) / 2; i++)
- {
- string sym = new string('~', (n - 3) / 2 - i);
- string diez = new string('#', (1 + 2 * i));
- Console.Write(sym);
- Console.Write(lastChar);
- if(lastChar == 'Z')
- {
- lastChar = 'A';
- }
- else
- {
- lastChar++;
- }
- Console.Write(diez);
- Console.Write(lastChar);
- if(lastChar == 'Z')
- {
- lastChar = 'A';
- }
- else
- {
- lastChar++;
- }
- Console.Write(sym);
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment