Search This Blog

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

C# PROGRAM TO PRINT SMILING FACE / ASCII VALUE OF 2


C# program to print smiling face:

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


Output:


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

c program for printing smiling face click here 


7 comments:

  1. Great blog with practical examples and useful suggestions. The content is easy to understand and apply. Keep creating such amazing posts.servicenow online training

    ReplyDelete
  2. Excellent content! Our OpenShift certification course offers expert-led training, practical experience, and job-oriented learning for IT professionals.openshift certification course

    ReplyDelete
  3. I enjoyed reading this blog and exploring its key points. The content provides a useful understanding of the subject.workday hr training

    ReplyDelete
  4. Excellent information! IBM DataStage administration training can help IT professionals develop practical skills in job management, performance monitoring, and production support.datastage administrator training


    ReplyDelete
  5. I enjoyed going through this article. The details are helpful for anyone who wants to explore this subject further.boomi courses

    ReplyDelete