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