Skip to content

Instantly share code, notes, and snippets.

@Thiago4532
Created June 14, 2019 12:28
Show Gist options
  • Save Thiago4532/722cbc0ac54055265fe2f29bf9688d6d to your computer and use it in GitHub Desktop.
Save Thiago4532/722cbc0ac54055265fe2f29bf9688d6d to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int fat = 1; // 1 * x = x, serve como número padrao
for(int i = 1; i <= n; i++) {
fat = fat * i;
}
cout << fat << "\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment