Initial Commit
This commit is contained in:
BIN
go/roman-numerals/cmd/cmd
Executable file
BIN
go/roman-numerals/cmd/cmd
Executable file
Binary file not shown.
22
go/roman-numerals/cmd/test.go
Normal file
22
go/roman-numerals/cmd/test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"../../roman-numerals"
|
||||
)
|
||||
|
||||
func main() {
|
||||
arabic := []int{0, -1, 4000, 3999, 1, 2, 3, 4, 5, 6, 9, 27, 48, 59, 93, 141, 163, 402, 575, 911, 1024, 3000}
|
||||
for i := range arabic {
|
||||
fmt.Println(strconv.Itoa(arabic[i]) + ": ")
|
||||
if v, err := romannumerals.ToRomanNumeral(arabic[i]); err == nil {
|
||||
fmt.Print("-->")
|
||||
fmt.Println(v)
|
||||
} else {
|
||||
fmt.Print("-->")
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user