You are on page 1of 1

#include <iostream>

using namespace std;

int main() {
int produs = 1;
int n;
int i=1;

cout << "Introduceti numarul: ";


cin >> n;

while (i<=n)
{
produs = produs * i;
i++;
}

cout << "n!= " << produs <<endl;

return 0;
}

You might also like