程序将希腊数字转换为英文数字,​​反之亦然 [英] program to convert Greek numbers to English numbers and vice versa

查看:270
本文介绍了程序将希腊数字转换为英文数字,​​反之亦然的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要使用Objective-C语言将希腊数字转换为英文数字,​​反之亦然的程序.
请有人帮我解决这个问题..

Hi,
I need program to convert greek numbers to english numbers and vice versa in objective-C language.
please anyone help me out in this..

推荐答案

看看这个转换器:
http://www.russellcottrell.com/greek/utilities/GreekNumberConverter.htm [ ^ ].

(摘自 http://en.wikipedia.org/wiki/Greek_numerals [ http://en.wikipedia.org/wiki/Roman_numerals#References [
Look at this converter:
http://www.russellcottrell.com/greek/utilities/GreekNumberConverter.htm[^].

(Referenced from http://en.wikipedia.org/wiki/Greek_numerals[^], please see.)

This is all I could find. As far as I understand, it is fully written in JavaScript, so you can look at the page source and copy the algorithm to learn how it works. As I can see, it only function from integers to Greek numerals, but back parsing is actually easier, so you can created it.

If, by some reason, this is not enough or not exactly what you need (as I could see, there are different variants of Greek numerals), then, as I just said in my comment, you can see how integers are converted into Roman numerals and back. When you see and understand the implementation, you can adopt it for Greek numerals. This certainly will work. So, please see the external links to this article:
http://en.wikipedia.org/wiki/Roman_numerals#References[^].

Some algorithms are preserved in source code. They are simple enough (when someone has already written it for you, of course) to understand and adopt to your needs. You should not be confused by the fact it is not Objective-C. Very little code is written in Objective-C, compared to other languages, so you should be used to it. Besides, this is pure integer and string calculation, where the differences between languages and platforms are not really significant. It''s all about the algorithm.

Good luck,
—SA


这篇关于程序将希腊数字转换为英文数字,​​反之亦然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆