Untitled
unknown
plain_text
2 years ago
251 B
4
Indexable
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; int fact(int x) { int g = x; for (int i = 1; i < x; i++){ g *= i; } return g; } int main() { int a; cin >> a; cout << fact(a); }
Editor is loading...