Write a program to find the factorial of a number – Basic C++ Programming

Program to find the factorial of a number in C++

[xyz-ihs snippet=”Google-Adsense”]

-Program:

#include <stdio.h>
#include <conio.h>
void main()
{
[xyz-ihs snippet=”200-x-90″]
int a, b=1, c;
clrscr();
printf(“Enter number:”);
scanf(“%d”, &c);
for(a=1; a<=c;a++)
b=b*a;
printf(“Required factorial of the number = %d”, b);
getch();
}

[xyz-ihs snippet=”200-x-90″]

-Output:

[xyz-ihs snippet=”200-x-90″]

cprogram

Program to find factorial of a number in C language programming


“My posts/articles/images are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

[xyz-ihs snippet=”200-x-90″]

Related Posts

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: