// Sam Slee - CPS 006 / Summer 2005
// Math4.java

import cs1.Keyboard;

public class Math4 {
	public static void main(String args[]) {
	
		int iterations;		// number of times we'll run through the loop
		int answer = 1;		// holds the value that we're calculating
		 
		/*  
			prompting the user for input  
		*/
		System.out.print("Enter the number you want the factorial of, here->");
		iterations = Keyboard.readInt();
		
		/* calculating the answer */
		for(int i = 1; i <= iterations; i++)
			answer = i * answer;
		
		// printing out the answer
		System.out.println("The answer is: "+answer);
	}
}