c programming

Wednesday, 19 August 2015

Programming in C to find the factorial of given number

#include<stdio.h>
#include<conio.h>
void main()
{
int a,fact=1;
clrscr();
printf("\nEnter a number :");
scanf("%d",&a);
while (a>=1)
{
printf(" %d *",a);
fact=fact*a;
a--;
}
printf(" = %d",fact);
printf("\n Factorial of given number is %d",fact);
getch();
}
Posted by Unknown at 05:10
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Unknown
View my complete profile

Blog Archive

  • ▼  2015 (15)
    • ▼  August (15)
      • Codes for a record entry project
      • Why we learn C language today?
      • C Basic
      • Programming in C to test that the given number is ...
      • Programming in C to find the cube of any number
      • Programming in C to find the square of the given n...
      • Programming in C to reverse a number
      • Programming in C to convert a letter from upper to...
      • Programming in C to find the sum of the given number
      • Programming in C to convert the Decimal number to ...
      • Programming in C to find the factorial of given nu...
      • Structure Of A C Program
      • Programming in C to find the name of the day of th...
      • Programming in C to find the value of any variable...
      • History of C
Travel theme. Powered by Blogger.