Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <locale>
- using namespace std;
- int setup();
- int main()
- {
- setup();
- int num, resultado = 1;
- cout << "Digite um numero para fatorar:\n-> ";
- cin >> num;
- for(int i = 1; i < num; i++)
- resultado = resultado * (i + 1);
- cout << resultado << endl;
- system("pause");
- return 0;
- }
- int setup()
- {
- setlocale(LC_ALL, "");
- system("color f9");
- }
Advertisement
Add Comment
Please, Sign In to add comment