// Test program #3 // Factorial.txt - Recursive factorial. // Print n! where n is read in from the user. public class Factorial{ public Factorial(){ super(); } public int fact(int n) { if (!(n >1)) return 1; else return (n* this.fact(n-1)); } public static void main() { Factorial f; JFSystem sys; int x, fact; sys = new JFSystem(); f = new Factorial(); x = sys.get(); fact = f.fact(x); (sys).put(fact); } }