Roman Numeral Converter
Kushandura nhamba dzakazara kuita nhamba dzeRomani uye kumashure.
Zvinyorwa zvinogadziridzwa paunenge uchinyora.
Nezve iyi kalkulator
A Roman numeral converter turns an ordinary number from 1 to 3,999 into Roman numerals like MCMLXXXIV, or reads a Roman numeral back into a number. Romans built values from the seven symbols I, V, X, L, C, D and M — worth 1, 5, 10, 50, 100, 500 and 1,000.
The system is mostly additive, writing larger symbols before smaller ones and adding them up, but it uses a subtractive shortcut for the 4s and 9s: IV is 4, IX is 9, XL is 40 and CM is 900. This converter also validates the input, rejecting malformed numerals such as IIII or VX.
Worked example: 2024 breaks into 1000 + 1000 + 10 + 10 + 4, which is MM + XX + IV = MMXXIV. Reading it back, MMXXIV adds 1000 + 1000 + 10 + 10 + (5 − 1) = 2024. Because the symbols only reach M, the largest value the standard system can write is 3,999, or MMMCMXCIX.
Zvimwe zvinobvunzwa zvakanyanya
Maitiro ekubvisa mitemo yebasa?
Kana chiratidzo chidiki chichiuya pamberi pechikuru chinodzoserwa: IV i4 (5 − 1), IX i9, XL i40 uye CM i900. Kana kuti chiratidzo chinowedzera kubva kuruboshwe kuenda kurudyi.
Nei 3,999 iri kuwedzera?
Standard Roman numerals chete kuenda kusvika 3,999 (MMMCMXCIX). Kutaura 4,000 kana kupfuura inodiwa overline notation kuti akawanda fonts uye mafomu anogona kuratidzwa.
Pane zero muRoman numerals?
Hapana. Roman system haina chiratidzo chezero uye hapana nzvimbo yemari, iyo ndiyo imwe yezvikonzero zvayo zvakazoshandiswa neArabic numerals for arithmetic.
Ndinogona sei kunyora 4 ne9 muRoma numerals?
Vanoshandisa pfungwa yekuti 4 i IV (imwe pamberi pegumi) uye 9 i IX (imwe pamberi pegumi).Iyiyo nzira inoita kuti 40 = XL, 90 = XC, 400 = CD uye 900 = CM.
Ndeipi nhamba yeRoma inoreva nhamba MMXXIV?
MMXXIV i 2024: maviri Ms i 2,000, maviri Xs i 20, uye IV i 4. Iyi nhamba yeRoma inoshandura inoverenga chero chiratidzo kubva kuruboshwe kuenda kurudyi, ichibvisa kana chidiki chichitevera chikuru.
Nei mushanduri achityora zvinyorwa se I?
Standard Roman notation haizombomira kudzokorora chiratidzo katatu; katatu kunonyorwa IV, kwete I. Mugadziri anotarisa kuti nhamba iri mumhando yakakodzera uye anopa zviratidzo zvekunyora zvisina standard sezvisina kunaka.
API — kushandisa iyi kalkulator kubva code
Nhare iyi calculator semahara JSON endpoint - hapana chikuru zvinodiwa. Kutumira nzvimbo mavara pasi separameter query kana JSON. Chii zvachose chaunoisa kunze chinoshandisa default iyo peji iri rakasviba nayo; parameter isiri yechokwadi inonzi 400, uye haisi zero. Tora yakazara API docs →
Endpoint
GET https://calculator.free/api/v1/roman-numerals/
curl
curl "https://calculator.free/api/v1/roman-numerals/?amount=2024&from=arabic&to=roman"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/roman-numerals/?" + new URLSearchParams({
"amount": "2024",
"from": "arabic",
"to": "roman"
}));
const data = await r.json();
console.log(data.results);
Zviratidzo zvemubvunzo ndezvekufungidzira kwechinangwa chekudzidzisa chete, kwete zvemari, zvehutano kana zvemari.