Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@theboreddev
Created June 11, 2020 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theboreddev/8e212333316b55424ab7cc8497f6f10d to your computer and use it in GitHub Desktop.
Save theboreddev/8e212333316b55424ab7cc8497f6f10d to your computer and use it in GitHub Desktop.
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