Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int number;
- int fact = 1;
- cout << "Введите число: ";
- cin >> number;
- int i = 1;
- while (i <= number) {
- fact *= i;
- i++;
- }
- cout << fact << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment