Doesn't catch improperly formatted roman numerals such as IIIIIII your program will return 7, but that is not a proper roman numeral. Seven is written as VII .
That's not a valid Roman integer anyway; L should come before the Xs and the I should come last, otherwise the algorithm treats the small before the large as a subtraction.
Website Link: www.codewhoop.com/string/roman-numerals-to-integer.html
Support Us: www.patreon.com/codewhoop
Excellent explanation
there are so many solutions on the internet but every soln is so tuff but you mde it so simple
nicely explained Thanks
Good, simple logic and clear explanation!
Thank you !!
Thanku Sir, for very smoothly explanation 😍🥳
Good Explaination
Wow you are amazing at explaining!
thank you !
excellent explanation thanks
Doesn't catch improperly formatted roman numerals such as IIIIIII your program will return 7, but that is not a proper roman numeral. Seven is written as VII .
@The Center of the Universe that's not all, if we get something like IXIXIXIX the program will still accept it despite the fact that it's incorrect.
HELPFUL!!
amazing sir keep it up
Thank you !
this code is not running in leetcode page giving wrong ans and showing error control may reach end of non viod func
why dont you show with classes in leet code
Because it's not supposed to be a void function.
Because the main fn is hidden in leet code
I gave input 3, it failed. gave me back 51 as the answer from your code.
3 to 51 is from char to ascii.
If I input str=XXIL then it's giving the output as 69, but the correct output should be 71.
That's not a valid Roman integer anyway; L should come before the Xs and the I should come last, otherwise the algorithm treats the small before the large as a subtraction.
but you hav to compile this on compiler for our conveince kindly..
Hey, I have provided the link to the .cpp file for the program in the description. You can easily download and compile it :)
Unfortunately, this code is wrong solution to a problem.
II=2
Can you help me to convert 30000 to roman numerals
His code should work exactly the same.