Open jhhlim opened 6 years ago
using namespace std;
int factorial(int);
int main() { int x, fact; cout<<"Enter number : "; cin>>x; //input fact =factorial(x); cout<<"Factorial: :"<<fact;
return 0;
}
int factorial(int x) { int fact=1;
while(x>=1) { fact=fact*x; x--; } return fact;
include
using namespace std;
int factorial(int);
int main() { int x, fact; cout<<"Enter number : "; cin>>x; //input fact =factorial(x); cout<<"Factorial: :"<<fact;
}
int factorial(int x) { int fact=1;
}