C++ program to find factorial of a given number

A simple cpp program to find factorial of a given number using foor loop. Input n=5 output =120 Time Complexity is O(n) //CPP program to find factorial of a given number // using for loop #include using namespace std; int main(){     int n,fact=1,i;     cout<<"Enter a number:";     cin>>n;     for(i=1;i<=n;i++){         fact =fact … Continue reading C++ program to find factorial of a given number