Files
convertroman/README.md
T
2021-02-07 15:19:37 -06:00

22 lines
301 B
Markdown

# Go Roman Numerals
Convert to and from roman numerals in Go.
```go
func ExampleToInt() {
integer, err := ToInt("IV")
if err != nil {
panic(err)
}
fmt.Println(integer == 4)
}
func ExampleFromInt() {
roman, err := FromInt(4)
if err != nil {
panic(err)
}
fmt.Println(roman == "IV")
}
```