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 _05.Snowflake
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num = int.Parse(Console.ReadLine());
- for (int i = 0; i < num - 1; i++)
- {
- Console.WriteLine(new string('.', i) +
- "*" + new string('.', num - i) +
- "*" + new string('.', num - i) +
- "*" + new string('.', i));
- }
- Console.WriteLine(new string('.', num - 1) +
- new string('*', (2 * num + 3) - (2 * (num - 1))) +
- new string('.', num - 1));
- Console.WriteLine(new string('*', 2 * num + 3));
- Console.WriteLine(new string('.', num - 1) +
- new string('*', (2 * num + 3) - (2 * (num - 1))) +
- new string('.', num - 1));
- for (int i = num - 2; i >= 0; i--)
- {
- Console.WriteLine(new string('.', i) +
- "*" + new string('.', num - i) +
- "*" + new string('.', num - i) +
- "*" + new string('.', i));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement