Zum Inhalt springen
Clean Code Developer School Logo
  • Home
  • Clean Code
    • Kontext
    • Agilität
    • Systematik
    • Flow-Design
    • Ansatz
    • Argumentation
  • Angebote
  • Coding Dojo
    • Idee
    • Function Katas
    • Class Katas
    • Library Katas
    • Application Katas
    • Architecture Katas
    • Refactoring Katas
    • Agility Katas
    • Weitere Katas
    • Das Flow-Design Cheat Sheet
  • Blog
  • Menü

To Roman Numerals

Function Kata „To Roman Numerals“

Implement a function that translates a decimal number to roman numerals.

Examples:

  • 1 -> „I“
  • 2 -> „II“
  • 4 -> „IV“
  • 5 -> „V“
  • 9 -> „IX“
  • 10 -> „X“
  • 42 -> „XLII“
  • 99 -> „XCIX“
  • 2013 -> „MMXIII“

The decimal numbers are in the range from 1 to 3000.

Roman numeralIVXLCDM
Value1510501005001000

Resources

[1] Roman numerals, https://en.wikipedia.org/wiki/Roman_numerals

Source

http://codingdojo.org/cgi-bin/wiki.pl?KataRomanNumerals

  • Impressum
  • Twitter
  • Datenschutzerklärung

© 2018 Clean Code Developer School
Webdesing by: wp4u

Ein Theme von SiteOrigin