This website completely moved to new platform. For latest content, visit www.programmingposts.com

Search this Site

19 Feb 2013

C# PROGRAM TO PRINT SMILEY SYMBOL

C# PROGRAM TO PRINT SMILEY / ASCII VALUE OF 1 :

original post

using System;
 
namespace SmilingFace
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 1, i;
            for (i = 0; i < 250; i++) //prints love symbol 250 times
                Console.Write((char)a);  
                //Console.Write((char)1);
            Console.ReadKey();
            
        }
    }
}

Output:


Explanation: Here we are just printing the ASCII symbol of 1 which looks like a smiling face. The ASCII symbol of 2 also looks similar to this   check here
other posts

Posts you may like :



No comments:

Post a Comment

Thanks for your comments.
-Sameer