codescracker


c

C Program to Print Smiling Face on Screen



« Previous Program Next Program »


Print Smiling Face on the Screen in C

To print smiling face on the screen in C programming, use the ASCII value of smiling face which is 1.

C Programming Code to Print Smiling Face on Screen

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<stdio.h>
#include<conio.h>
void main()
{
	clrscr();
	int sml=1, i, limit;
	printf("How many smiley face you want to print ? ");
	scanf("%d",&limit);
	for(i=0; i<limit; i++)
	{
		printf("%c ",sml);
	}
	getch();
}

When the above c program is compile and executed, it will produce the following result:

c program print smiling face

You can also format the output screen of the smiling face as per your requirement

Same Program in Other Programming Language

You may also like same program in other programming language:


« Previous Program Next Program »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test