Search This Blog

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

C# PROGRAM TO PRINT LOVE SYMBOL


c# program to print love symbol


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


Explanation : most of the c# learners shock by seeing this.Actually here we are printing the ASCII value of 3 . Which gives a love symbol. 
you can also print directly by writing the following code.

Console.Write((char)3);

for c program to  print love symbol click here  

Output:

8 comments:

  1. This is my first visit to your blog, your post made productive reading, thank you. dot net training in chennai

    ReplyDelete
  2. You post explain everything in detail and it was very interesting to read. Thank you. nata coaching centres in chennai

    ReplyDelete
  3. Informative article, just what I was looking for.seo services chennai

    ReplyDelete