Skip to content

Instantly share code, notes, and snippets.

@fredbr
Created May 2, 2018 22:49
Show Gist options
  • Save fredbr/29e936a1dd878f6f6d5aa70450cc6a83 to your computer and use it in GitHub Desktop.
Save fredbr/29e936a1dd878f6f6d5aa70450cc6a83 to your computer and use it in GitHub Desktop.
Fatorial Simples
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int ans = 1;
for (int i = 1; i <= n; i++) ans *= i;
cout << ans << "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment