#include <iostream>
using namespace std;
int main() {
int n;
cout<<" enter a number : ";
cin>>n;
int product;
product = 1;
int i;
for ( i=1; i<=n; i++){
product = product * i;
cout<<product<<endl;
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: