`Demonsbreath - DBC Challenge entry `------------------------------------------------- `Roman to Arabic input numeral$ numeral$=upper$(numeral$) print numeral$ for t=1 to len(numeral$) temp$=mid$(numeral$,t) select temp$ case "M" : inc number,1000 : endcase case "D" : inc number,500 : endcase case "C" : inc number,100 : endcase case "L" : inc number,50 : endcase case "X" : inc number,10 : endcase case "V" : inc number,5 : endcase case "I" : inc number,1 : endcase endselect next t print number `------------------------------------------------- `Arabic to Roman numeral$="" input number repeat if number>=1000 number=number-1000 numeral$=numeral$+"M" else if number>=900 number=number-900 numeral$=numeral$+"CM" else if number>=500 number=number-500 numeral$=numeral$+"D" else if number>=400 number=number-400 numeral$=numeral$+"CD" else if number>=100 number=number-100 numeral$=numeral$+"C" else if number>=90 number=number-90 numeral$=numeral$+"XC" else if number>=50 number=number-50 numeral$=numeral$+"L" else if number>=40 number=number-40 numeral$=numeral$+"XL" else if number>=10 number=number-10 numeral$=numeral$+"X" else if number>=9 number=number-9 numeral$=numeral$+"IX" else if number>=5 number=number-5 numeral$=numeral$+"V" else if number>=4 number=number-4 numeral$=numeral$+"IV" else if number>=1 number=number-1 numeral$=numeral$+"I" endif endif endif endif endif endif endif endif endif endif endif endif endif until number=0 print numeral$