注册 登录
查看: 2367|回复: 0
打印 上一主题 下一主题

英文作业:输入一个1~3999数字 将这个数字换成罗马数字

[复制链接]

该用户从未签到

3524

主题

3538

帖子

67万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
673178
QQ
跳转到指定楼层
楼主
发表于 2018-10-25 21:21:30 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
Assignment #7

Goals:
Ø This lab gives students more experience in
· Top-down Design and procedural abstraction.
· Good style programming


Background Information
Roman Numbers.  The Roman Number System has seven digits as follows:

        I        1
        V        5
        X        10        
            L        50
        C        100
        D        500
        M        1000

Numbers are formed according to the following rules:

1. Only numbers up to 3999 are represented.
2. As in decimal system, the thousands, hundreds, tens, and ones are expressed separately.
3.   The numbers 1 to 9 are expressed as shown.  As you can see, an I preceding a V or X is subtracted from the value, and you can never have more than three I’s in a row.
I        II        III        IV        V        VI        VII        VIII        IX
4. Tens and hundreds are done the same way, except that letters X, L, C, D, M are used instead of letters I, V, X.  
Requirement:
Write an algorithm and then a structured program that converts a positive integer into Roman Number System. Your program shall take, as input, a number such as 1978, and convert it to its equivalent in the Roman Number System as MCMLXXVIII.


Marking Scheme
[3 marks] Presentation/Style: Organization, readability, descriptive identifier, indentation, bracket
   placement.
[14 marks] Correctness: Program works without bugs. Appropriate us of methods.
[3 marks] Documentation: Internal



此源码经过详细测试 保证能运行!!!


下载地址:
游客,本付费内容需要支付 100金币 才能浏览支付

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
java无忧网(http://www.javawyw.com),专业提供Java大作业,小作业,课程设计,毕业设计源码,答辩辅导,作业排错,bug修复,专业解答,远程部署运行项目等服务
本网站所有源码,保证能运行!
QQ:1399491757
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回列表 返回顶部