Created
June 11, 2020 20:31
-
-
Save theboreddev/8e212333316b55424ab7cc8497f6f10d to your computer and use it in GitHub Desktop.
singleDigitsImpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RomanNumerals { | |
public static String convert(int number) { | |
if (number == 5) { | |
return "V"; | |
} else if (number ==10) { | |
return "X"; | |
} else if (number == 50) { | |
return "L"; | |
} else if (number == 100) { | |
return "C"; | |
} else if (number == 500) { | |
return "D"; | |
} else if (number == 1000) { | |
return "M"; | |
} | |
return "I"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment