milen8204

[C# Basics}PrimitiveDataTypesAndVariables

Mar 12th, 2014
389
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. /* Write a program that prints an isosceles triangle of 9 copyright symbols ©, something like this:
  3.  *    ©
  4.  *   © ©
  5.  *  ©   ©
  6.  * © © © ©
  7.  * Note that the © symbol may be displayed incorrectly at the console so you may need to change the console character encoding to UTF-8 and assign a Unicode-friendly font in the console.
  8.  * Note also, that under old versions of Windows the © symbol may still be displayed incorrectly, regardless of how much effort you put to fix it. */
  9. class IsoscelesTriangle
  10. {
  11.     static void Main()
  12.     {
  13.         char copyright = '\u00A9';
  14.         Console.WriteLine("   {0}   \n  {0} {0}  \n {0}   {0} \n{0} {0} {0} {0}",copyright);
  15.     }
  16. }
RAW Paste Data