Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

12. Develop a Haskell function roman that takes an Int) in the range from 0 to 3

ID: 3746679 • Letter: 1

Question

12. Develop a Haskell function roman that takes an Int) in the range from 0 to 3999 (inclusive) and returns the corresponding Roman numeral as a string (using capital letters). The function should halt with an appropriate error messages if the argument is below or above the range. Roman numbers use the following symbols and are combined by addition or subtraction of symbols. V 5 X 10 50 C 100 D 500 1000 For the purposes of this exercise, we represent the Roman numeral for 0 as the empty string. The Roman numbers for integers 1-20 are 1, II. III, IV, V, VI, VII, VIII, IX, X, X, X, XIII, xiv, xv. XVI, XVII, XVII, XIX, and XX. Integers 40, 90, 400, and 900 are xL, Xc, cD, and CM

Explanation / Answer

Please find the code below.

CODE

===================