Skip to content

jferrl/roman-numerals-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Roman Numerals Kata

Go Report Card Build Status

Roman Numerals Kata

Your Task

Write a method String convert(int) that takes a number and converts it to the according String representation.

Examples

1 ➔ I

2 ➔ II

3 ➔ III

4 ➔ IV

5 ➔ V

9 ➔ IX

21 ➔ XXI

50 ➔ L

100 ➔ C

500 ➔ D

1000 ➔ M

Hint

This kata lures a lot of people to implement features in the order of the numbers. But do not forget that it’s sometimes easier to start with a general case and add exceptions later.

Test

You can test this proyect using go test. Just run:

go test ./...