Friday 4 July 2014

Program to print Factorial of a number


//Factorial
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long int num,fact;
fact=1;
cout<<"ENTER A NUMBER:";
cin>>num;
for(int i=1;i<=num;i++)
fact=fact*i;
cout<<"FACTIRIAL OF "<<num<<"="<<fact;
getch();

}

1 comment:

  1. factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
    factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.

    ReplyDelete