GREEN: return hardcoded "IV" for 4
This commit is contained in:
parent
87b7e79462
commit
5c9962eb61
1 changed files with 6 additions and 1 deletions
|
|
@ -3,7 +3,12 @@ String integerToRoman(int number) {
|
||||||
for (int i = 0; i < number; i++) {
|
for (int i = 0; i < number; i++) {
|
||||||
if (number == 5) {
|
if (number == 5) {
|
||||||
result += 'V';
|
result += 'V';
|
||||||
break;
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (number == 4) {
|
||||||
|
result += 'IV';
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
result += 'I';
|
result += 'I';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue