Git Product home page Git Product logo

factorial-zero-counter's Introduction

Factorial end-Zero counter

The program counts zeros at the end of the factorial value of a number. We take into account that given number no more then Long.MAX_VALUE = 9223372036854775807, just for convenience.

Usage

To compile it's necessary execute:

mvn clean install -Dlog4j.configuration=PATH_TO_LOG4J_PROPERTIES

Where PATH_TO_LOG4J_PROPERTIES is a path to log4j.properties file. Now it's located in src/main/resources/log4j.properties.
In log4j.properties you can change file for logging.

To execute it's necessary to execute JAR located in target.

java -jar factorial-zero-ends-counter.jar

You can use -h key to look how to use app.

java -jar factorial-zero-ends-counter.jar -h

Output:

usage: factorial-zero-ends-counter [options] [number]
-h,--help Display usage.
-n,--number Given number for calculations. No more than Long.MAX_VALUE. Default value is 1000.

Default number is 100

Example usage

The example how to start app and save metadata to res.csv file using 5 threads and with input order:

  • It's necessary to compile project:
    mvn clean install -DskipTests -Dlog4j.configuration=${PATH_TO_PROJECT}/src/main/resources/log4j.properties
  • Execute jar file:
    java -jar factorial-zero-ends-counter.jar -n 1000

factorial-zero-counter's People

Contributors

igorryabtsev avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.