Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Caspichania
- {
- class caspichan
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int dotCount = n;
- int innerDotCount = 0;
- int width = n * 2 + 1;
- int height = 6 + ((n - 3) / 2) * 3;
- for (int i = 1; i <= height; i++)
- {
- string outerDots = new string('.', dotCount);
- string innerDots = new string('.', innerDotCount);
- if (i != n + 1&&i!=height)
- {
- Console.Write(outerDots);
- if (i == 1) Console.Write('*');
- else
- if (i == 2) Console.Write("***");
- else
- {
- Console.Write('*');
- Console.Write(innerDots);
- Console.Write('*');
- Console.Write(innerDots);
- Console.Write('*');
- }
- Console.Write(outerDots);
- }
- if(i==n+1) {string fullStars = new string('*',width);Console.Write(fullStars);}
- if (i == height)
- {
- Console.Write(outerDots);
- string lastStars = new string('*', width - (2 * dotCount));
- Console.Write(lastStars);
- Console.Write(outerDots);
- }
- if(i<n) {dotCount--;}
- if(i>n+1) {dotCount++;}
- if(i>1&&i<n) {innerDotCount++;}
- if(i>n+1) {innerDotCount--;}
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement