Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Arabic to roman

Arabic to roman

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GetOn GetGoing
    wrote on last edited by
    #1

    I want to write a console application, Which will convert arabic numbers to roman. But the problem is in roman 5000,10000 etc will be represented as V and a "-" symbol upon V..but i dont how to get these characters please let me know how to write a string a "-" upon them. Please note that this is for console application Its very urgent

    J 1 Reply Last reply
    0
    • G GetOn GetGoing

      I want to write a console application, Which will convert arabic numbers to roman. But the problem is in roman 5000,10000 etc will be represented as V and a "-" symbol upon V..but i dont how to get these characters please let me know how to write a string a "-" upon them. Please note that this is for console application Its very urgent

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      Sounds like a class assignment for a computer science class... GetOn&GetGoing wrote: 5000,10000 etc will be represented as V and a "-" symbol upon V What do you mean, the fact that the roman numeral for five is a V with exaggerated serifs?

      G 1 Reply Last reply
      0
      • J John Kuhn

        Sounds like a class assignment for a computer science class... GetOn&GetGoing wrote: 5000,10000 etc will be represented as V and a "-" symbol upon V What do you mean, the fact that the roman numeral for five is a V with exaggerated serifs?

        G Offline
        G Offline
        GetOn GetGoing
        wrote on last edited by
        #3

        Ya i got it... But how you will represnt 5000 you cant represent with "MMMMM", you should represnt as V and a "-" on that, i dont know how to print this kind of special characters in console application.

        J 1 Reply Last reply
        0
        • G GetOn GetGoing

          Ya i got it... But how you will represnt 5000 you cant represent with "MMMMM", you should represnt as V and a "-" on that, i dont know how to print this kind of special characters in console application.

          J Offline
          J Offline
          John Kuhn
          wrote on last edited by
          #4

          Ok, so a horizontal line over the roman numeral V is supposed to represent the fact that the number is multiplied by 1000. I think that that usage isn't really in vogue any more, but if it is necessary, how about writing an underscore ("_") on the line above the value?

          G 1 Reply Last reply
          0
          • J John Kuhn

            Ok, so a horizontal line over the roman numeral V is supposed to represent the fact that the number is multiplied by 1000. I think that that usage isn't really in vogue any more, but if it is necessary, how about writing an underscore ("_") on the line above the value?

            G Offline
            G Offline
            GetOn GetGoing
            wrote on last edited by
            #5

            Ya that will be fine with me... But how to do that for a consle application

            J 1 Reply Last reply
            0
            • G GetOn GetGoing

              Ya that will be fine with me... But how to do that for a consle application

              J Offline
              J Offline
              John Kuhn
              wrote on last edited by
              #6

              Ok, you know that you generate output in a console application with Console.Write() and Console.WriteLine(), right? So, figure out which position of your roman number is the 1000's, then write an underscore on the line before you write the roman numerals: Console.WriteLine("_"); Console.WriteLine("VCXIX"); :doh:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups