Skip to content

Instantly share code, notes, and snippets.

@haru01
Last active May 30, 2017 00:03
Show Gist options
  • Save haru01/632acb91eb7ab6d41a30ef1b2fa16949 to your computer and use it in GitHub Desktop.
Save haru01/632acb91eb7ab6d41a30ef1b2fa16949 to your computer and use it in GitHub Desktop.
step4 V
package roman
func ToRoman(in uint16) string {
numbers := []struct {
arabian uint16
roman string
}{
{1, "I"},
{5, "V"},
}
for _, n := range numbers {
if n.arabian == in {
return n.roman
}
}
return "_" // TODO
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment