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