Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Dumbel
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- // First Line
- int firstDots = n/2;
- int amPer = n/2+1;
- Console.WriteLine("{0}{1}{2}{1}{0}",
- new string('.', firstDots),new string('&', amPer),new string('.', n),
- new string('.', firstDots),new string('&', amPer));
- // EndFirst Line
- // Second line
- int middleLines = n / 2 - 1;
- for (int i = 0; i < middleLines; i++)
- {
- Console.WriteLine("{0}&{1}&{2}&{1}&{0}",
- new string('.',n/2-1-i),new string ('*',n/2+i),new string ('.',n));
- }
- // EndSecond line
- // Third line
- Console.WriteLine("&{0}&{1}&{0}&", new string ('*',n-2),new string ('=',n));
- // EndThird line
- // Fourth Line
- for (int i = 0; i < middleLines; i++)
- {
- Console.WriteLine("{0}&{1}&{2}&{1}&{0}",
- new string('.',1+i), new string('*', n -3-i), new string('.', n));
- }
- // EndFOurthLine
- // Last Line
- Console.WriteLine("{0}{1}{2}{1}{0}",
- new string('.', firstDots), new string('&', amPer), new string('.', n),
- new string('.', firstDots), new string('&', amPer));
- // EndLast Line
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement