## Lab 3 Roman Numerals## Due Oct 2 |

Write a program that accepts a year written as a four-digit

Symbol | I | V | X | L | C | D | M |
---|---|---|---|---|---|---|---|

Value | 1 | 5 | 10 | 50 | 100 | 500 | 1,000 |

You can explore and test Roman Numerals here: Roman Numerals Converter

Your program should give an appropriate error if the input is not a valid four-digit year between 1000 and 3000.

Enter a year between 1000 and 3000 (0 to end): 1957 Year 1957 is MCMLVII in Roman numerals Enter a year between 1000 and 3000 (0 to end): 2018 Year 2018 is MMXVIII in Roman numerals Enter a year between 1000 and 3000 (0 to end): 265 Enter a year between 1000 and 3000 (0 to end): 1245 Year 1245 is MCCXLV in Roman numerals Enter a year between 1000 and 3000 (0 to end): 2999 Year 2999 is MMCMXCIX in Roman numerals Enter a year between 1000 and 3000 (0 to end): 1000 Year 1000 is M in Roman numerals Enter a year between 1000 and 3000 (0 to end): 0

- 1650
- 2033
- 1999
- 2001
- 2736
- A year that is too small
- A year that is too large

Requirements | Grading Comments | Points | Score |
---|---|---|---|

Completion of all functional requirements | 60 | ||

Code broken up in fsmall, single function unctions | 10 | ||

Appropriate code formatting | 5 | ||

Meaningful identifier names (variables, functions) | 10 | ||

Comments at the top, and on all functions | 5 | ||

Document with a run of all trial cases | 10 | ||

Total | 100 |

Solution

Copyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Ideas, requests, problems regarding TWiki? Send feedback

Ideas, requests, problems regarding TWiki? Send feedback