Computer Science, asked by Sharukh507, 1 month ago

write a c++ orograms to find the factorial of a given number
please tommorow exam​

Answers

Answered by aditikanwadkar
2

Answer:

#include <iostream>

using namespace std;

int main()

{

int i,fact=1,number;

cout<<"Enter any Number: ";

cin>>number;

for(i=1;i<=number;i++){

fact=fact*i;

}

cout<<"Factorial of " <<number<<" is: "<<fact<<endl;

return 0;

}

Mark me brainliest !!

Answered by Berseria
5

Answer :

Required C++ Program :

To find Factorial Of a Number ;

#include <iostream>

Using namespace std;

int main ( )

{

int n, i, fact = 1 ;

cout<< " Enter number to find the

Factorial ";

cin>>n ;

for ( i = 1 ; i<=n ; ++i )

fact = fact * 1 ;

cout << " Factorial of " << n << " is " <<fact ;

}

Output :

Enter number to find Factorial 6

Factorial Of 6 is 720

____________

Similar questions