👤

Calculati produsul p=1*2*3*...*n

Răspuns :


#include <iostream>
using namespace std;
int p=1,i,n;
int main()
{cin>>n;
for (i=1;i<=n;i++)
p=p*i;
cout<<p;}