Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Axe
- {
- using System;
- class Program
- {
- static int outerdotCount;
- static int innerDotCount;
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- outerdotCount = 2 * n - 2;
- innerDotCount = 3 * n;
- printTop(n);
- printMiddle(n);
- printBottom(n);
- }
- private static void printBottom(int n)
- {
- int bettweenStars = outerdotCount;
- for (int i = 0; i <= n / 2 - 1; i++)
- {
- if (i == n / 2 - 1)
- {
- Console.WriteLine("{0}*{1}*{2}",
- new string('-', innerDotCount),
- new string('*', bettweenStars),
- new string('-', outerdotCount));
- continue;
- }
- Console.WriteLine("{0}*{1}*{2}",
- new string('-', innerDotCount),
- new string('-', bettweenStars),
- new string('-', outerdotCount));
- bettweenStars += 2;
- innerDotCount--;
- outerdotCount--;
- }
- }
- private static void printMiddle(int n)
- {
- for (int i = 0; i < n / 2; i++)
- {
- Console.WriteLine("{0}*{1}*{1}",
- new string('*', innerDotCount),
- new string('-', outerdotCount));
- }
- }
- private static void printTop(int n)
- {
- Console.WriteLine("{0}**{1}", new string('-', innerDotCount),
- new string('-', outerdotCount));
- for (int bettweenCount = 1; bettweenCount < n; bettweenCount++)
- {
- Console.WriteLine("{0}*{1}*{2}",
- new string('-', innerDotCount),
- new string('-', bettweenCount),
- new string('-', outerdotCount -= 1));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment