int fact(int x) { int ret = 1; while(x > 1) { ret = ret * x; x = x - 1; }; return ret; } int main() { fact(5); }