Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- Console.OutputEncoding = System.Text.Encoding.Unicode;
- char ch = '\u00A9';
- int height = 4;
- int buffer = height - 1;
- int colCount = (height*2)-1;
- for (int cntRow = 0; cntRow < height; cntRow++ )
- {
- for (int cntCol = 1; cntCol <= colCount; cntCol++ )
- {
- if (cntRow < (height - 1))
- {
- if (cntCol == (colCount - buffer) || cntCol == (buffer + 1))
- {
- Console.Write(ch);
- }
- else
- {
- Console.Write(" ");
- }
- }
- else
- {
- Console.Write(cntCol % 2 == 0 ? " " : "{0}", ch);
- }
- }
- buffer--;
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement