Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

$ steps
Usage: steps [flags]
Flags:
  -F    Calculate fibonacci sequence
  -a    Perform addition
  -e string 
        End value
  -f    Calculate factorial
  -h    Show hexadecimal result
  -m    Perform multiplication
  -p    Perform exponentiation
  -r    Show only the result
  -s string
        Start value
  -v    Show amount of characters in decimal and hexadecimal

$ go run steps.go -a -s 1 -e 10
1 + 1 = 2
2 + 2 = 4
3 + 3 = 6
4 + 4 = 8
5 + 5 = 10
6 + 6 = 12
7 + 7 = 14
8 + 8 = 16
9 + 9 = 18
10 + 10 = 20

$ go run steps.go -m -s 1 -e 10
1 * 1 = 1
2 * 2 = 4
3 * 3 = 9
4 * 4 = 16
5 * 5 = 25
6 * 6 = 36
7 * 7 = 49
8 * 8 = 64
9 * 9 = 81
10 * 10 = 100

$ go run steps.go -p -s 1 -e 10
1 ^ 1 = 1
2 ^ 2 = 4
3 ^ 3 = 27
4 ^ 4 = 256
5 ^ 5 = 3125
6 ^ 6 = 46656
7 ^ 7 = 823543
8 ^ 8 = 16777216
9 ^ 9 = 387420489
10 ^ 10 = 10000000000

$ go run steps.go -f -s 1 -e 10
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
10! = 3628800

$ go run steps.go -F -s 1 -e 10
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55

About

Just playing with numbers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages