Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- unsigned int n;
- long double fatorial = 1;
- cout << "Entre com o número: ";
- cin >> n;
- for(int i = 1; i <=n; ++i)
- {
- fatorial *= i;
- }
- string s = to_string(fatorial);
- cout << "Fatorial de " << n << " = " << s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement