Website Summary Files Commits Branches @commit @diff @stats
path: root / Week04 / Exercise17.cpp
blob: 5537a43b819f660ab85e4d654025ce1c57b3727a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

int main() {
    unsigned int number;
    std::cin >> number;

    unsigned int factorial = 1;
    for (unsigned int current = 2; current <= number; current++) {
        factorial *= current;
    }

    std::cout << factorial;

    return 0;
}