Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
264 B
1
Indexable
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;

int main()
{
	int a;
	cin >> a;
	int sum = 1;
	if (a != 0) {
		for (int i = 1; i < a; i++) {
			sum *= i;
		}
	}
	if (a == 0) sum = 0;
	cout << sum;
}