An open API service indexing awesome lists of open source software.

https://github.com/mawrkus/kata-roman-numerals

The Roman Numerals Kata 🌱
https://github.com/mawrkus/kata-roman-numerals

Last synced: about 1 month ago
JSON representation

The Roman Numerals Kata 🌱

Awesome Lists containing this project

README

          

# Roman Numerals Kata

Source: http://kata-log.rocks/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.