go-by-test/roman/roman.go

14 lines
221 B
Go
Raw Normal View History

package roman
import "strings"
func ConvertToRoman(arabic int) string {
var converted strings.Builder
if arabic <= 3 {
for i := 0; i < arabic; i++ {
converted.WriteString("I")
}
}
return converted.String()
}