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 ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i <= n / 2; i++)
- {
- string outerDots = new string('.', n / 2 - i);
- if (i == 0)
- {
- Console.WriteLine(outerDots + "*" + outerDots);
- }
- else
- {
- string innerDots = new string('.', 2 * i - 1);
- if (i == n /2)
- {
- string line = new string('*', n);
- Console.WriteLine(line);
- }
- else
- {
- Console.WriteLine(outerDots + "*" + innerDots + "*" + outerDots);
- }
- }
- }
- for (int j = 0; j < n / 2; j++)
- {
- string outerDots = new string('.', n / 4);
- string innerDots = new string('.', n - 2 - 2 * (n / 4));
- if (j == n / 2 - 1)
- {
- string line = new string('*', n - 2 * (n / 4));
- Console.WriteLine(outerDots + line + outerDots);
- }
- else
- {
- Console.WriteLine(outerDots + "*" + innerDots + "*" + outerDots);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement