Created
June 14, 2019 12:28
-
-
Save Thiago4532/722cbc0ac54055265fe2f29bf9688d6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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