项目作者: hisakatha

项目描述 :
This is a test repository for GitHub training.
高级语言: Scala
项目地址: git://github.com/hisakatha/GitHubTraining.git
创建时间: 2017-01-26T01:17:31Z
项目社区:https://github.com/hisakatha/GitHubTraining

开源协议:GNU General Public License v3.0

下载


GitHubTraining Build Status

( This is a test repository for GitHub training. )

This program calculates a sum (in default) or a product of integers in the command line arguments.

Requirement

You need sbt or some program which can compile Scala code.

Install and Usage

Fisrt,

  1. git clone https://github.com/hisakatha/GitHubTraining [TARGET_DIRECTORY]

then move to TARGET_DIRECTORY, and

  1. sbt "run [options] <integer>..."

Options

calc is a temporal name of this program.

  1. calc 1.0
  2. Usage: calc [options] <integer>...
  3. -m, --multiply Return a product instead of a sum.
  4. <integer>... Integers to be calculated.
  5. --help Print this help text
  6. --version
  7. Return the number calculated from integers of the command line argument. In default, integers are added.

Examples

Calculate a sum

sbt "run 2 3 4" returns 9

Calculate a product

sbt "run -m 2 3 4" returns 24

License

GNU GPL version 3

ChangeLogs

  • version 1.0 : This program calculates a sum (in default) or a product of integers in the command line arguments.

Author(s)