C# program to print SMILEY:
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
No comments:
Post a Comment
Thanks for your comments.
-Sameer