public class Faculty {
public static void main (String [] args) {
int i;
int f;
int n;
try {
n = Integer.parseInt (args[0]);
for (i = 1, f = i; i <= n; i++)
f = f*i;
System.out.println (Integer.toString(f));
}
catch (ArrayIndexOutOfBoundsException e) {
System.out.println ("You have not given the neccessary number of arguments");
}
catch (NumberFormatException e) {
System.out.println ("You have not given the neccessary type of arguments");
}
}
}