Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class AceOfDiamonds
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- // first
- Console.WriteLine("{0}",new string ('*',n));
- // end
- // second
- int secondLines = n / 2 - 1;
- int secondAt = 1;
- for (int i = 0; i < n/2-1; i++)
- {
- Console.WriteLine("*{0}{1}{0}*", new string('-', secondLines), new string('@', secondAt));
- secondAt += 2;
- secondLines--;
- }
- // end second
- // third
- Console.WriteLine("*{0}*",new string ('@',n-2));
- // end third
- // four
- for (int i = 0; i < n / 2 - 1; i++)
- {
- secondAt -= 2;
- secondLines++;
- Console.WriteLine("*{0}{1}{0}*", new string('-', secondLines), new string('@', secondAt));
- }
- // end four
- Console.WriteLine("{0}", new string('*', n));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement