Created
June 14, 2019 12:29
-
-
Save Thiago4532/56c54083f1171d512fa7f116f85b5cfe 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
// Codigo por Lidiane Gomes | |
#include <bits/stdc++.h> | |
using namespace std; | |
int fat(int n) | |
{ | |
if(n == 1) | |
return 1; | |
return n * fat(n - 1); | |
} | |
int main(int argc, char** argv) | |
{ | |
int p; | |
cin >> p; | |
cout << fat(p) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment