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 Problem_03___Illuminati_Lock__PB___17_January_2016_
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- var height = n + 1;
- var width = 3 * n;
- //first
- Console.Write(new string('.', n));
- Console.Write(new string('#', n));
- Console.WriteLine(new string('.', n));
- // second
- var pointsSecond = n - 2;
- Console.Write(new string('.', pointsSecond));
- Console.Write(new string('#', 3));
- Console.Write(new string('.', pointsSecond));
- Console.Write(new string('#', 3));
- Console.WriteLine(new string('.', pointsSecond));
- //third
- var pointsBeggining = pointsSecond;
- var pointsMiddle = 2;
- for (int i = 0; i < (height - 2) / 2; i++)
- {
- Console.Write(new string('.', pointsBeggining));
- Console.Write("##");
- Console.Write(new string('.', pointsMiddle));
- Console.Write('#');
- Console.Write(new string('.', pointsSecond));
- Console.Write('#');
- Console.Write(new string('.', pointsMiddle));
- Console.Write("##");
- Console.WriteLine(new string('.', pointsBeggining));
- pointsBeggining -= 2;
- pointsMiddle += 2;
- // fourth
- Console.Write(new string('.', ));
- Console.Write("##");
- Console.Write(new string('.', ));
- Console.Write('#');
- Console.Write(new string('.', pointsSecond));
- Console.Write('#');
- Console.Write(new string('.',));
- Console.Write("##");
- Console.WriteLine(new string('.',));
- //last line
- Console.Write(new string('.', n));
- Console.Write(new string('*', n));
- Console.WriteLine(new string('.',n));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement