We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9986d1e commit 66f44f2Copy full SHA for 66f44f2
property-base-test/roman_number.go
@@ -18,9 +18,9 @@ var allRomanNumerals = []RomanNumerals{
18
func ConvertToRoman(arabic int) string {
19
var result strings.Builder
20
for _, romanNumeral := range allRomanNumerals {
21
- if arabic >= romanNumeral.Value {
22
- arabic -= romanNumeral.Value
+ for arabic >= romanNumeral.Value {
23
result.WriteString(romanNumeral.Symbol)
+ arabic -= romanNumeral.Value
24
}
25
26
return result.String()
0 commit comments