Skip to content

Roman to Integer conversion return integer in case of invalid Roman String. #2070

@Aniket10k

Description

@Aniket10k

In Roman to Integer conversion. When we put an invalid roman string it still responds with an integer which is wrong.
In roman numbers only some exceptions are presents like "IX" is 9 and "IV" is 4. But "IC" is not 99 It should be "XCIX". But If we give input as "IC" it returns as 99. But it should be an invalid input response.

Given Example input as : "IC"

Response : 99

Expected behavior : Invalid Response.

Same behavior is seen in all other examples.

Numbers from 1 to 100 you can check here : https://www.rapidtables.com/math/symbols/roman-numerals-1-100.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions