mawrkus / kata-roman-numerals

The Roman Numerals Kata 🌱

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

The Roman Numerals Kata 🌱