Thread: how do i display a roman numerals from ordinary numbers??

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    15

    how do i display a roman numerals from ordinary numbers??

    my problem is this...please help. i need a algorithm and solution,,

    Write a program that accepts an ordinary number and outputs its equivalent roman numerals.
    The ordinary numbers and their equivalent Roman numerals are given below..

    Ordinary Numbers = Roman Numerals
    1=I
    5=V
    10=X
    50=L
    100=C
    500=D
    100=M

    SAMPLE Input/output Dialogue:
    Enter a number:2968(Input number)
    MMCMLXVIII(Output)


    Note that the maximum input number is 3000.


    please i need a algorithm and solution as simple as can..note that i am only a basic student/learner of c++..
    my email is <<<snipped>>>
    thank you!
    Last edited by Salem; 07-04-2011 at 10:35 PM. Reason: Snip email address

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    I think you're going to have to put a little more effort into this assignment if you want to find help here. Have you read this yet?

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    mr.matticus i am only required to use a switch/case and nested if conditons to solve that problem can you help me??

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Alas, I cannot help you with the program, as I haven't touched C++ in years - I'm currently taking my studies of 'C' to a deeper level as this is where my passion lies. Even if I could write the code for you, I would not do so for this goes against the spirit of these forums.

    If, on the other hand, you need some help generating an algorithm, I would be glad to help. But the same limitation applies - I will assist with any difficulties, but the work will have to come from you. This site is all about learning, and most people here are more than willing to spend their personal time helping people if they're willing to put forth the effort themselves. But it's not worth anyone's time to do someone else's work for them.

    Do you have any experience with writing flow charts?

  5. #5
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    yes!!
    i have a experience in making b flowchart...hmm,,...i dont need the whole solution and algorithm..i am only want to have a some reference or guidlines for me to create my own algorithm and flowchart..

  6. #6
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    can we chat on ym so that it is much easier to us..to have a conversation??

  7. #7
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    There is good information here.

    That will tell you how to convert a number to Roman numerals. Once you understand this, work out a few problems on paper. Write down each step you take from start to finish.

    That is your flow chart. You can start to develop the logic in your program from this step-by-step approach. I'm pretty sure this is what you're asking for. Let me know if you had any other questions.

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Quote Originally Posted by Carr Paulo View Post
    can we chat on ym so that it is much easier to us..to have a conversation??
    Sorry, I'm actually busy going through my own book right now, working out exercises at the end of the chapter. I come in for quick update checks, but can't commit to a long conversation about this right now.

  9. #9
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    ok tnk you..for helping me ..i hope that youll finish your book as what you are expecting...im sure that the book that is made by you is a good and full of knowleged and information..that can help and satisfide thr readers,,,thank you again..

  10. #10
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    by the way im a only a 17 years old boy from asia..and my from a poor family so that we dont have enough money to send me in some exclusive schools..thats way im not so pretty good in english..sorry for so many wrong grammars.^_^

  11. #11
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Don't worry about it, you communicated well.

    I can't afford school myself right now, so I'm working through my old 'C' book trying to learn on my own. Good luck with the program!

  12. #12
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    how hurt say that unproffessional attitude to me with out knowing my REAL side..and ignoring what situation am i..to close my 2nd thread..and to insulting me.. like that.is that an act of a mentor??all of you i treated you all my seniors and mentors..thats why i am hir asking on all of you..

    yes!!!they are right when they say that theres no one will do my assignment for me...but like i said before i dont need the whole algorithm,,..i dont need the flowchart and solution...i am only looking for a ideas how to do it because i have no idea how or where i start it when it begins on the process or the formula..in short what i gonna do??do i need to enumerate it from 0 to 3000 using the if....else statement??or switch/case statement??,..i ask it actually to my mentor,,.no need to enumerate all from 0 to 1000..but he didnt told me what i will do??do i need to use a operators??what operators??like i said on my other post i am only required to use 2 kinds of statement and header files..

    i have only want to ask some ideas,references and examples...
    Last edited by Carr Paulo; 07-05-2011 at 05:16 PM. Reason: wrong spelling on want(i want to edit it,.if i dont do that maybe some people see it will insult me too...)

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    OK, so your second thread was closed because you already have a thread on the subject.
    And as we have said, forget all about if statements / switch cases, operators, etc. Focus on a flow chart first.
    And when you've done that, show us what you've accomplished so far and ask specific questions about what you are having trouble with.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    (1) I have not seen anyone insulting you; but I've seen a few try to help you (myself included).

    (2) You posted your assignment twice, which is bad etiquette on this board. That is why your second thread was closed.

    (3) I don't think your "poor me" attitude will get you very far here.

    ---

    I will try to be fair to you now. I'll try to help you again if you post some sort of code (in proper code tags). Anything. Give me a preprocessor directive and main function with brackets. Let me at least see that.

    Not to be insulting, but if you can't deliver that, then there's little we can do to help you anyway.

  15. #15
    Registered User
    Join Date
    Jul 2011
    Posts
    15
    #include<stdio.h>
    #include<conio.h>
    main()
    {
    int n;
    printf("Enter The a Number:\n");
    scanf("%d",&n);

    (then??what should comes next??on ly the process is my problem..what kind of operators,and formula i will use to display that output without enumerating it all/..)

    i cant do a flowchart without having a algorithm because i am only studying programming for almost 9months(c++)and it is my first time to study a programming languages..and our proffesor told me at the very first,,..that first of all i have to first the algorithm,..because the flowchart and solution will depend on it..in short if theres no algorithm,..theres no flowchart and solution..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Roman Numerals
    By jfrizzy in forum C Programming
    Replies: 2
    Last Post: 11-23-2009, 07:43 PM
  2. integers to roman numerals(beginner)
    By FragileWarning1 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2007, 01:38 PM
  3. converting arabic to roman numerals
    By kaisha8 in forum C++ Programming
    Replies: 2
    Last Post: 09-26-2004, 01:02 AM
  4. Making roman numerals into arabic numbers
    By Mule in forum C++ Programming
    Replies: 2
    Last Post: 04-12-2003, 11:35 PM
  5. Need help with Roman Numerals
    By kiddprogrammer in forum C Programming
    Replies: 6
    Last Post: 04-01-2003, 11:45 PM