C++ Programming Code Examples C++ > Pyramid Patterns Code Examples Programming Code to Print Smiling Face on Screen Programming Code to Print Smiling Face on Screen To print smiling face on the screen in C++ programming, first you have to ask from the user that how many smiling face he/she want to print on the output screen to print required number of smiling face on the screen. So to print smiling face on the screen, use the ASCII value of smiling face, which is 1, first make a variable say sml of int type and initialize 1 to it. Now make a variable say ch of type char and initialize sml to ch. After performing this, ch is now contains smiling face, now print the required number of smiling face on the screen as shown here in the following program.. Following C++ program ask to the user that how many smiling face he or she want to print on the screen to print the required number of smiling face on the screen: /* C++ Program - Print Smiling Face on Screen */ #include<iostream.h> #include<conio.h> void main() { clrscr(); int sml=1, j, limit; char ch=sml; cout<<"How many smiley face you want to print ? "; cin>>limit; for(j=0; j<limit; j++) { cout<<ch<<" "; } getch(); }