Giter VIP home page Giter VIP logo

convertdecimalnumbertoromanandreverse's Introduction

Roman numerals

The basis of the project is to Implement a solution that can convert Roman numerals to decimal value and from decimal value to Roman numerals. The rules for Roman numerals vary, but the rules we work from are described as below.

Seven letters denote the numbers in the Roman system:

Section I = 1

§ V = 5

§ X = 10

§ L = 50

§ C = 100

§ D = 500

§ M = 1000

Rules:

  • § If the same Roman numeral is written consecutively, the number is added

    Example: II = 1 + 1 = 2

  • § If a smaller Roman numeral is written after a large Roman numeral, the number is added to the large one

    Example: VI = 5 + 1 = 6

  • § If a smaller Roman numeral is written before a larger number, the number is subtracted from the larger one Example: IV = 5 – 1 = 4

  • § There may only be one smaller Roman numeral in front of a larger Roman numeral

  • § Only I, X and C can appear before a larger Roman numeral You can only stand in front of V and X X can only be in front of L and C C can only stand before D and M

  • § There may be no more than three identical Roman numerals in succession V, L and D are never repeated

It is enough to be able to convert numbers less than 3000

Proposal for acceptance test: 1999, 2444, 90

convertdecimalnumbertoromanandreverse's People

Contributors

iamyakose avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.