Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
singleDigitsImpl
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