发布时间:2022-08-09 文章分类:编程知识 投稿人:王小丽 字号: 默认 | | 超大 打印

Roman numerals/Encode

From Rosetta Code
< Roman numerals
Jump to: navigation,
search

Roman numerals/Encode

You are encouraged to solve this task according to the task description, using any language you may know.

Create a function taking a positive integer as its parameter and returning a string containing the Roman Numeral representation of that integer.

Modern Roman numerals are written by expressing each digit separately starting with the left most digit and skipping any digit with a value of zero. In Roman numerals 1990 is rendered: 1000=M, 900=CM, 90=XC; resulting in MCMXC. 2008 is written as 2000=MM, 8=VIII; or MMVIII. 1666 uses each Roman symbol in descending order: MDCLXVI.

Contents

[hide]

  • 1 ActionScript
  • 2 Ada
  • 3 ALGOL 68
  • 4 ALGOL W
  • 5 AutoHotkey
  • 6 AWK
  • 7 BASIC

    • 7.1 ZX Spectrum Basic
  • 8 Bracmat
  • 9 C
  • 10 C#
  • 11 C++
  • 12 CoffeeScript
  • 13 Common Lisp
  • 14 Clojure
  • 15 D
  • 16 Delphi
  • 17 DWScript
  • 18 Erlang
  • 19 Euphoria
  • 20 Factor
  • 21 FALSE
  • 22 Fan
  • 23 Forth
  • 24 Fortran
  • 25 Go
  • 26 Groovy
  • 27 Haskell
  • 28 HicEst
  • 29 Icon and Unicon
  • 30 Io
  • 31 J
  • 32 Java
  • 33 JavaScript
  • 34 LaTeX
  • 35 Liberty BASIC
  • 36 Logo
  • 37 LotusScript
  • 38 Lua
  • 39 M4
  • 40 Mathematica
  • 41 MUMPS
  • 42 Objeck
  • 43 OCaml
  • 44 OpenEdge/Progress
  • 45 Oz
  • 46 PARI/GP
  • 47 Pascal
  • 48 Perl
  • 49 Perl 6

    • 49.1 Sample usage
  • 50 PHP
  • 51 PicoLisp
  • 52 Pike
  • 53 plainTeX
  • 54 PL/I
  • 55 PowerBASIC
  • 56 Prolog
  • 57 Protium
  • 58 PureBasic
  • 59 Python
  • 60 R
  • 61 Retro
  • 62 REXX

    • 62.1 version 1
    • 62.2 version 2
  • 63 Ruby
  • 64 Run BASIC
  • 65 Scala
  • 66 Scala Using foldLeft
  • 67 Scheme
  • 68 Seed7
  • 69 Tcl
  • 70 SNOBOL4
  • 71 TI-83 BASIC
  • 72 TUSCRIPT
  • 73 Ursala
  • 74 Vedit macro language
  • 75 Visual Basic
  • 76 XSLT
  • 77 Zsh