int fact(int x) { int y = 1; int z = 1L; while (y <= x) { z = z * y; y++; } return z; }