/media/sda-magnetic/david/Extern-Magnetic-2022-06-29/Extern01/Dokumente-2021-05-8/disk10-ab-2020-01-10/02-debian-pc2-work/informatik/java-new/2020-11-12-01/Faculty.java


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");
        }
            
    }
}