Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void Factorial(int N)
- {
- int rez = 1;
- for (int i = 1; i <= N; i++)
- {
- rez = rez * i;
- }
- cout << endl;
- cout << "Факториал равен" << " " << rez << endl;
- }
- int main()
- {
- setlocale(LC_ALL, "Russian");
- int N;
- cout << "Найдите факторил" << endl;
- cout << endl;
- cout << "Введите число " << endl;
- cin >> N;
- Factorial(N);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment