Skip to content

Instantly share code, notes, and snippets.

@yao2030
Created November 15, 2012 06:45
Show Gist options
  • Save yao2030/4077067 to your computer and use it in GitHub Desktop.
Save yao2030/4077067 to your computer and use it in GitHub Desktop.
conver roman numeral numbers to arabic
(define (arabic sent)
(if (= (count sent) 1)
(roman-value (first sent))
(if (< (roman-value (first sent)) (roman-value (first (bf sent))))
(+ (roman-value (first sent)) (- (first (bf sent))) (arabic (bf (bf sent))))
(+ (roman-value (first sent)) (arabic (bf sent))))))
@yao2030
Copy link
Author

yao2030 commented Nov 15, 2012

rememer the argument is a word, not a sent, just a typo in the program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment