public static void main( String[] args )
    {
    	Options options = new Options();
    	CmdLineParser parser = new CmdLineParser( options);
    	boolean goodCommandLine;
    	try 
    	{
			parser.parseArgument(args);
			goodCommandLine = true;
		}
    	catch (CmdLineException exc) 
    	{
    		goodCommandLine = false;
    		System.err.println( exc.getMessage());
    		System.err.println("primes [options]");
    		parser.printUsage(System.err);
		}
    	if (goodCommandLine)
    	{
    	    if (options.sumPrimes)
    	    {
    	        sumPrimes( options.ceiling);
    	    }
    	    else if (options.numberToFactor > 3)
    	    {
    	        findFactor( options.numberToFactor);
    	    }
    	    else if (options.triangularNumberFactorCount > 0)
    	    {
    	        findFirstTriangularNumberFactorCountGreaterThan( options.triangularNumberFactorCount);
    	    }
    	    else
    	    {
    	        findPrimes( options.ceiling, options.noPrint);
    	    }
    	}
    }