a60e8a8
1 2 3 4 5 6 7 8 9 10 11
#include <iostream> int fact_loop(int n) { int r = 1; while (n > 1) r = r * n--; return r; } int main() { std::cout << fact_loop(5) << "\n"; }