{"id":286,"date":"2010-10-08T10:07:13","date_gmt":"2010-10-08T09:07:13","guid":{"rendered":"http:\/\/www.holliesoft.de\/weblog\/2010\/10\/08\/c-umrechnung-arabische-zahlen-rmische-zahlen\/"},"modified":"2010-10-08T10:07:13","modified_gmt":"2010-10-08T09:07:13","slug":"c-umrechnung-arabische-zahlen-rmische-zahlen","status":"publish","type":"post","link":"https:\/\/www.holliesoft.de\/weblog\/2010\/10\/08\/c-umrechnung-arabische-zahlen-rmische-zahlen\/","title":{"rendered":"c#: Umrechnung arabische Zahlen&ndash;&gt; r&ouml;mische Zahlen"},"content":{"rendered":"<p>Die folgende Methode habe ich beim c# Seminar in Hamburg erstellt:<\/p>\n<pre>private string roman(int number)\n        {\n            StringBuilder result = new StringBuilder();\n            int[] digitsValues = { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000 };\n            string[] romanDigits = { &quot;I&quot;, &quot;IV&quot;, &quot;V&quot;, &quot;IX&quot;, &quot;X&quot;, &quot;XL&quot;, &quot;L&quot;, &quot;XC&quot;, &quot;C&quot;, &quot;CD&quot;, &quot;D&quot;, &quot;CM&quot;, &quot;M&quot; };\n            while (number &gt; 0)\n            {\n                for (int i = digitsValues.Count() - 1; i &gt;= 0; i--)\n                    if (number \/ digitsValues[i] &gt;= 1)\n                    {\n                        number -= digitsValues[i];\n                        result.Append(romanDigits[i]);\n                        break;\n                    }\n            }\n            return result.ToString();\n        }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Die folgende Methode habe ich beim c# Seminar in Hamburg erstellt: private string roman(int number) { StringBuilder result = new StringBuilder(); int[] digitsValues = { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000 }; string[] romanDigits = { &quot;I&quot;, &quot;IV&quot;, &quot;V&quot;, &quot;IX&quot;, &quot;X&quot;, &quot;XL&quot;, &quot;L&quot;, &quot;XC&quot;, &quot;C&quot;, &quot;CD&quot;, &quot;D&quot;, &quot;CM&quot;, [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"https:\/\/www.holliesoft.de\/weblog\/2010\/10\/08\/c-umrechnung-arabische-zahlen-rmische-zahlen\/\">Weiterlesen\u00a0\u2026<span class=\"screen-reader-text\"> from c#: Umrechnung arabische Zahlen&ndash;&gt; r&ouml;mische Zahlen<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-286","post","type-post","status-publish","format-standard","hentry","category-net"],"_links":{"self":[{"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/posts\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":0,"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/posts\/286\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/media?parent=286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/categories?post=286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.holliesoft.de\/weblog\/wp-json\/wp\/v2\/tags?post=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}