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;
- namespace Snowflake
- {
- class Program
- {
- static void Main(string[] args)
- {
- int size = int.Parse(Console.ReadLine());
- int height = 2 * size + 1;
- int width = 2 * size + 3;
- char Dots = '.';
- char asterisks = '*';
- for (int row = 0; row <= height / 2 - 2; row++)
- {
- Console.WriteLine("{0}*{1}*{1}*{0}", new string(Dots, row), new string(Dots,size));
- size--;
- }
- for (int row = 0; row <= height / 2 - 2; row++)
- {
- size++;
- }
- Console.WriteLine("{0}{1}{0}", new string(Dots, size - 1), new string(asterisks, 5));
- Console.WriteLine(new string(asterisks,width));
- Console.WriteLine("{0}{1}{0}", new string(Dots, size - 1), new string(asterisks, 5));
- for (int row = 0; row <= height / 2 - 2; row++)
- {
- Console.WriteLine("{0}*{1}*{1}*{0}", new string(Dots, size - 2), new string(Dots, row + 2));
- size--;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement