Free Essay

Roman Numeral

In:

Submitted By earl002
Words 484
Pages 2
Roman Numerals
Sample VB Application

This program converts an integer in the range of 1 through 3999 to its equivalent in Roman numerals. It also converts a Roman numeral string to its decimal equivalent.

The rules for Roman numerals are as follows: • The basic symbols are I (= 1), V (= 5), X (= 10), L (= 50), C (= 100), D (= 500), and M (= 1000). • If a letter is immediately followed by one of equal or lesser value, the two numbers are added; thus, XX = 20, XV = 15, VI = 6. • If a letter is immediately followed by one of greater value, the first is subtracted from the second; thus IV = 4, XL = 40, CM = 900. • A bar over a letter multiplies it by 1000; thus, an X with a bar over it = 10,000. Such numbers will not be addressed by this project.

Examples:
The numbers from 1 to 10 are: I, II, III, IV, V, VI, VII, VIII, IX, X.
XLVII = 47, CXVI = 116, MCXX = 1120, MCMXIV = 1914.

Note that a given symbol appears no more than three times consecutively in a number. This is why 4 is written as "IV" instead of "IIII", and 40 is written as "XL" instead of "XXXX".

Probably the most challenging part of converting a Roman Numerals number to decimal is not the conversion itself, but rather validating the input. Basic validation would include converting keystroke input to uppercase and allowing only the characters I, V, X, L, C, D, and M to be entered. Beyond that, the following rules should be applied: • D, L, or V may each only appear at most one time in the string • M, C, X, or I may appear no more that three times consecutively in the string • The following pairs of letters are invalid in all cases: IL, IC, ID, IM, XD, XM, VX, VL, VC, VD, VM, LC, LD, LM, DM. • Once a letter has been subtracted from, neither it nor its "5 counterpart" may appear again in the string - so neither X nor V can follow IX, neither C nor L may follow XC, and neither M nor D may follow CM. • Once a letter has been used as a subtraction modifier, it cannot appear again in the string - so C cannot follow CD or CM, X cannot follow XL or XC, and I cannot follow IV or IX. • Once I, X, or C (or their "5-counterparts" V, L, and D) appears in a string, the I, X, or C cannot subsequently be used as subtraction modifiers - so IV or IX cannot follow I or V, XL or XC cannot follow X or L, and CD or CM cannot follow C or D.

Sample runs are shown below.

[pic]

When the user selects "Roman Numerals to Decimal Number" for the conversion type, note that the captions change and the reverse conversion is performed:

[pic]

Example of invalid input:

[pic]

[pic]

Similar Documents

Free Essay

Hdfs 1300

...| |Basic Outlining Format Guide for Chapter Outlines | Title of the Chapter  I.  Topic of First Main Section of the chapter (include definitions, explanations, details and page numbers) A.     First Main Point under the First Main Section of the chapter (include definitions, explanations, details and page numbers) 1. Subpoint under the Main point                 a. Detail and/or definition for the subpoint           2.  Subpoint under the Main point                 a. Detail and/or definition for the subpoint              3.  Subpoint under the Main point                 a. Detail and/or definition for the subpoint B.     Second Main Point under the First Main Section of the chapter (include definitions, explanations, details and page numbers) 1. Subpoint under the Main point                 a. Detail and/or definition for the subpoint           2.  Subpoint under the Main point                 a. Detail and/or definition for the subpoint           3.  Subpoint under the Main point                 a. Detail and/or definition for the subpoint C.     Third Main Point under the First Main Section of the chapter (include definitions, explanations, details and page numbers) 1. Subpoint under the Main point                 a. Detail and/or...

Words: 401 - Pages: 2

Free Essay

How to Save Money from Allowance

...Writing an Outline |   An outline is a “blueprint” or “plan” for your paper. It helps you to organize your thoughts and arguments. A good outline can make conducting research and then writing the paper very efficient. Your outline page must include your: * Paper Title * Thesis statement * Major points/arguments indicated by Roman numerals (i.e., I, II, III, IV, V, etc.) * Support for your major points, indicated by capital Arabic numerals (i.e., A, B, C, D, E, etc.)   Roman numeral I should be your “Introduction”. In the introduction portion of your paper, you’ll want to tell your reader what your paper is about and then tell what your paper hopes to prove (your thesis). So an Introduction gives an overview of the topic and your thesis statement.   The final Roman numeral should be your “Conclusion”. In the conclusion, you summarize what you have told your reader.   Following are 3 sample outlines, from actual student papers. YOUR outline can be MORE detailed, or might be LESS detailed. Remember that a good outline makes writing easier and more efficient.   Sample Outline #1  Title: Frederick Douglass Thesis: Frederick Douglass played a crucial role in securing the abolition of slavery and equality of African-American rights through his actions, ideas, and efforts as a lecturer, author/publisher, and politician.                I.     Introduction A.    Thesis B.    Roles/Arguments             II.     Douglass as Lecturer A.    History as slave and acquisition...

Words: 1185 - Pages: 5

Free Essay

Articles Writing

...Preface of article writing/Some ‘Tips’ on writing an excellent Articles Writing of an article require through knowledge of the topic, good vocabulary, good command over the grammar and good writing skill and presenting the facts and figures in compact, concise, organized and systematic way. Articles writing are an art. Many students find the writing of articles difficult task. If your article is poor written, you will be loosing marks. And, in the outside world, you would be a failure. It is very important to write in a crisp, clear style, with good sentence construction and proper punctuation. Needless to say spelling mistakes also fail to impress your views. One, who wants to write good articles, should develop interest in reading standard books of renowned authors, informative magazines and Newspapers. Reading develops power of analyzing the thing in proper perspective and also develops power of thinking and imagination. In the beginning, reading may appear a boring drill, but gradually you will find the reading as the best pastime and surely up confidence in life resulted from reading. Napoleon once said,” Show me a family of reader and I will show you the people who move the world” An article can have many purposes, but the basic structure is the same irrespective of the subject or the topic .you may be writing an article to argue a particular point of view or to explain the steps necessary for the welfare of the society .either way, your article will have the some basic...

Words: 871 - Pages: 4

Premium Essay

Solon Paper Outline

...Solon Paper Outline Introduction a.) Discuss Themes b.) Talk about how you will organize the essay (Explain how you will be talking about the essay in three parts: Aristocrats vs. Peasants, Aristocrats vs. Aristocrats, Political Constitution) Part I: Aristocrats vs. Peasants *MAKE SURE TO LABEL THIS AS ROMAN NUMERAL I* a.) Topic sentence (Example: “This first part will talk about the conflict between Aristocrats vs. Peasants”) b.) Land Ownership c.) Debt Slavery d.) How does Solon solve these problems through economic laws—partially, mostly, or not at all? Part II: Aristocrats vs. Aristocrats *MAKE SURE TO LABEL THIS ROMAN NUMERAL II* a.) Topic sentence (Example: “This second part will talk about the conflict between Aristocrats vs. Aristocrats”) b.) Fight for Political Power c.) Friendship d.) How does Solon solve these problems through family laws—partially, mostly, or not at all? Part III: Political Constitution: *MAKE SURE TO LABEL THIS ROMAN NUMERAL III* a.) Topic sentence (Example: “This third part will talk about the Political Constituion”) b.) Government System c.) How do Solon’s political laws change Athens? Part IV: Conclusion a.) This last part can either be a summary of parts I-III, or a climax (Example: “I raised the issue of whether or not Solon solved the issues and I believe he did/did not”) Important to Remember: a.) Talk about primary sources: Plutarch’s Solon and The Athenian Constitution b.) Try not to use the first person...

Words: 266 - Pages: 2

Premium Essay

Resume

...Solon Paper Outline Solon Paper Outline Introduction a.) Discuss Themes b.) Talk about how you will organize the essay (Explain how you will be talking about the essay in three parts: Aristocrats vs. Peasants, Aristocrats vs. Aristocrats, Political Constitution) Part I: Aristocrats vs. Peasants *MAKE SURE TO LABEL THIS AS ROMAN NUMERAL I* a.) Topic sentence (Example: “This first part will talk about the conflict between Aristocrats vs. Peasants”) b.) Land Ownership c.) Debt Slavery d.) How does Solon solve these problems through economic laws—partially, mostly, or not at all? Part II: Aristocrats vs. Aristocrats *MAKE SURE TO LABEL THIS ROMAN NUMERAL II* a.) Topic sentence (Example: “This second part will talk about the conflict between Aristocrats vs. Aristocrats”) b.) Fight for Political Power c.) Friendship d.) How does Solon solve these problems through family laws—partially, mostly, or not at all? Part III: Political Constitution: *MAKE SURE TO LABEL THIS ROMAN NUMERAL III* a.) Topic sentence (Example: “This third part will talk about the Political Constituion”) b.) Government System c.) How do Solon’s political laws change Athens? Part IV: Conclusion a.) This last part can either be a summary of parts I-III, or a climax (Example: “I raised the issue of whether or not Solon solved the issues and I believe he did/did not”) Important to Remember: a.) Talk about primary sources: Plutarch’s Solon and The Athenian Constitution b.) Try not...

Words: 269 - Pages: 2

Premium Essay

Psychology

...TABLE OF CONTENTS {This is the Table of Contents which is required. All the materials following the Table of Contents must be listed. The format should follow that of the APA Publication Manual and titles and subtitles should be listed as they appear in the text of the final thesis, capstone, and final project manuscript. Pages are numbered in lower case Roman numerals. The margins are 1” top, bottom, and right side and 1.5” on the left side.} Page Chapter One: Introduction ……...……………………………………………………...1 Historical Background….………………………………………………………1 Statement of the Problem………………………………………………………4 Definition of Terms……………………………………………………………12 Chapter Two: Review of the Literature………………………………………………..18 National Studies Conducted……………………………………………………20 Local Investigations…………………………………………………………….26 Chapter Three: The Methodology………………………………………………………36 The Participants…………………………………………………………………42 {Chapter titles and major headings must be listed word-for-word as they appear in the text. Section headings must be single space if they are more than one line long and there must be one double space between each entry.} LIST OF TABLES {The List of Tables page should have a centered heading in all capital letters, one inch from the top of the page. Long table titles must be single-spaced with double spacing between each entry. Page number must be given for each...

Words: 260 - Pages: 2

Free Essay

Outline Making

...Writing a Formal Outline MAKING AN OUTLINE TO HAND IN Finally, you may also be required to write a formal outline--an outline that serves as a guide to your paper for your reader. If you haven't already been making formal outlines, this outline will be a formal version of your previous notes; it lays out your main points and subpoints for your reader. Generally, this kind of outline uses conventions of formal outlining: Roman numerals, letters and indentations. Sometimes this sort of outline can be produced after you have written your essay. Formal outlines can be written in two ways. In topic outlines, the ideas are expressed in parallel phrases (in other words, they are expressed in the same grammatical form--as noun phrases, as verb phrases, etc.). Topic outlines have the advantage of being brief. In sentence outlines, on the other hand, the ideas are expressed in complete, though not necessarily parallel, sentences. Sentence outlines give the reader a clearer idea of what you will argue. Regardless of the kind of formal outline you choose, convention states that you begin with a statement of your thesis and indicate increasing levels of support in this order: I., A., 1., a., (1), (a). In scientific papers, however, a decimal system is also commonly used. A topic outline follows: Thesis: Among the pluralist, elitist, and neo-Marxist political theories, neo-Marxism provides the most powerful analysis of the current political scene. I. Functions of political theories ...

Words: 399 - Pages: 2

Free Essay

Speech 1

...Jeffrey Lyons What are Our Phone’s made out of? So what’s the one thing we can’t leave our houses without? For most people its their phone. They have conversations and memories among other things that make them very personal devices. So what exactly is our phone? What’s it made of? Unfortunately, I feel as if we too concerned with what our phones can do rather than what it actually is. And In order to get a better idea on how these phones are made, and whose making them, we need to know essentially what they’re made out of. Body of Outline- with a minimum of 3 main points as Roman numerals and at a least two additional levels of sub points using capital letters. I- Smartphone batteries are made from Lithium A China produced 5,000 tons of lithium during 2014. That represents a 300-ton increase from 2013. B Alkali Lake is located 7 miles from a chemical plant in Oregon, and it is the only producing lithium brine operation in North America. II- Who obtains this Lithium and How A  -Foxconn has more than 100 production lines working 24 hours a day and each production line has to meet a very strong demand. B On top of that, with labor being as cheap as it is in China, Foxconn is keeps 90% of its production factories right there. III- So Now these companies are “Under the microscope” A "If companies don't know or don't care who is producing their products, it's much harder to know whether workers are being...

Words: 378 - Pages: 2

Free Essay

How to Write Research Ppaper

...Chapter 1. How to Write an A+ Research Paper This Chapter outlines the logical steps to writing a good research paper. To achieve supreme excellence or perfection in anything you do, you need more than just the knowledge. Like the Olympic athlete aiming for the gold medal, you must have a positive attitude and the belief that you have the ability to achieve it. That is the real start to writing an A+ research paper. CONTENTS: STEP 1. CHOOSE A TOPIC STEP 2. FIND INFORMATION STEP 3. STATE YOUR THESIS STEP 4. MAKE A TENTATIVE OUTLINE STEP 5. ORGANIZE YOUR NOTES STEP 6. WRITE YOUR FIRST DRAFT STEP 7. REVISE YOUR OUTLINE AND DRAFT Checklist One Checklist Two STEP 8. TYPE FINAL PAPER STEP 1. CHOOSE A TOPIC Choose a topic which interests and challenges you. Your attitude towards the topic may well determine the amount of effort and enthusiasm you put into your research. Focus on a limited aspect, e.g. narrow it down from "Religion" to "World Religion" to "Buddhism". Obtain teacher approval for your topic before embarking on a full-scale research. If you are uncertain as to what is expected of you in completing the assignment or project, re-read your assignment sheet carefully or ASK your teacher. Select a subject you can manage. Avoid subjects that are too technical, learned, or specialized. Avoid topics that have only a very narrow range of source materials. STEP 2. FIND INFORMATION Surf the Net. For general or background information...

Words: 2333 - Pages: 10

Free Essay

Term Paper

...How to Make  Term Papers Outline ?   A good term paper outline should have the following sequence and contents to write a term paper. Introduction Introduce the topic of your term paper about which you have to write the term paper and proceed to write thesis statement. Thesis statement Thesis statement is an essential part of any term paper. Develop a thesis statement which clearly states the point you are discussing. Body of the Term Paper The body of the term paper has all the points to discuss and support with favorable evidences, experiments or examples. Present the collected data in a way that supports the thesis statement. Conclusions It is the final part where you have to present all the results you got from the research and make suggestions for further development in the field. Bibliography It is the list of references of the sources of information. There are different formats of referencing the information resources such as APA, MLA, Harvard, etc. So use the one instructed by your supervisor. CONTENTS: STEP 1. CHOOSE A TOPIC STEP 2. FIND INFORMATION STEP 3. STATE YOUR THESIS STEP 4. MAKE A TENTATIVE OUTLINE STEP 5. ORGANIZE YOUR NOTES STEP 6. WRITE YOUR FIRST DRAFT STEP 7. REVISE YOUR OUTLINE AND DRAFT               Checklist One   Checklist Two STEP 8. TYPE FINAL PAPER STEP 1. CHOOSE A TOPIC Choose a topic which interests and challenges you. Your attitude towards the topic may well determine the amount of effort and...

Words: 2167 - Pages: 9

Premium Essay

Mobile World

...Guide to Writing a Basic Essay An essay can have many purposes, but the basic structure is the same no matter what. You may be writing an essay to argue for a particular point of view or to explain the steps necessary to complete a task. Either way, your essay will have the same basic format. If you follow a few simple steps, you will find that the essay almost writes itself. You will be responsible only for supplying ideas, which are the important part of the essay anyway. Don't let the thought of putting pen to paper daunt you. Get started! These simple steps will guide you through the essay writing process: • • • • Decide on your topic. Prepare an outline or diagram of your ideas. Write your thesis statement. Write the body. • • • • • • Write the main points. Write the subpoints. Elaborate on the subpoints. Write the introduction. Write the conclusion. Add the finishing touches. Choose a Topic for Your Essay Topic Has Been Assigned You may have no choice as to your topic. If this is the case, you still may not be ready to jump to the next step. Think about the type of paper you are expected to produce. Should it be a general overview, or a specific analysis of the topic? If it should be an overview, then you are probably ready to move to the next step. If it should be a specific analysis, make sure your topic is fairly specific. If it is too general, you must choose a narrower subtopic to discuss. For example, the topic "KENYA" is a general one. If your objective is...

Words: 2605 - Pages: 11

Premium Essay

Case Study on Sore Throut

...Sample Outline for Case Study Note: Each of these roman numerals and letters represent a segment of your paper, not a paragragh. I. Introduction: Overview of the type of substance abuse issue you are focusing upon, its impact (on society and this agency) and your interest in this agency. (Tip: Open with something shocking or startling which will grab your reader’s attention. Look at some of the articles you have read to get ideas.) II. Agency A. The agency/program you choose to examine and why B. History of the agency/program C. Current data on agency/program: size, number of personnel, service area, mission, etc D. Who you spoke to in the agency/program E. Conclusion you came to after conducting your initial interviews 1. What is the challenge this agency faces in regard to substance abuse? III. Issue you discovered A. Thought provoking discussion of the issue and what problems it causes 1. Challenges for society in general 2. Challenges for the agency/program 3. Challenges for those in the agency/program 4. Possible solutions or ways to address this problem that occurred to you before doing the research IV. Your research A. Articles you examined which relate to this issue B. Findings of those articles C. How you feel these findings relate to your agency/program and their challenges ...

Words: 361 - Pages: 2

Premium Essay

Math Problem Set

...FINAL EXAM CHEM 1310 FS11 VERSION GREEN Name: ____________________ 1.|How many liters of chlorine gas at 25°C and 0.950 atm can be produced by the reaction of 12.0 g of MnO2? MnO2(s) + 4HCl(aq) ® MnCl2(aq) + 2H2O(l) + Cl2(g)| A)|3.55 L| B)|3.09 L| C)|0.138 L| D)|5.36 ´ 10-3 L| E)|0.282 L| 2.|A 6.0-ft person weighs 168 lb. What is this person's height in meters and weight in kilograms? (1 lb = 453.6 g; 1 m = 3.28 ft.)| A)|5.4 m, 76.2 kg| B)|1.8 m, 76.2 kg| C)|2.3 m, 43.2 kg| D)|1.8 m, 7620 kg| 3.|The speed of sound in air at room temperature is about 343 m/s. What is this speed in miles per hour? (1 mi = 1609 m.)| A)|12.8 mph| B)|343 mph| C)|767 mph| D)|46020 mph| 4.|The oxidation number of Fe in K3Fe(CN)6 is| A)|-3| B)|+3| C)|+2| D)|-4| E)|+1| 5.|What is 25.4 mg when converted to kilograms?| A)|2.54 kg| B)|2.54 ´ 104 kg| C)|2.54 ´10–5 kg| D)|2540 kg| 6.|What is the formula for copper (II) cyanide?| A)|Cu(CN)2| B)|Cu2CN| C)|CuNCO| D)|CuCN| 7.|What is the molar mass of acetaminophen, C8H9NO2?| A)|125 g/mol| B)|162 g/mol| C)|76 g/mol| D)|43 g/mol| E)|151 g/mol| 8.|Calculate the mass of iron(II) sulfide formed when 27.66 g of Fe reacts with 14.44 g of S.| A)|9.17 g| B)|5.27 g| C)|39.60 g| D)|14.44 g| E)|43.54 g| 9.|Aluminum is a lightweight metal (density = 2.70 g/cm3) used in aircraft construction, high-voltage transmission lines, beverage cans, and foils. What is its density in kg/m3?| A)|8.2 ´ 102 kg/m3| ...

Words: 1514 - Pages: 7

Free Essay

Human Communication

...DULAST DAY OF PREP FOR INFORMATIVE SPCH FA 13 Human Communication (5th ed.), Pearson, Nelson, Titsworth, Harter OUTLINING I. Ps. 274-280: Examples of a Sentence Outline to be submitted before delivering speech—Should be complete sentences. Use the examples as models, especially in indentation and symbolization. A. Levels: Roman numerals: I, II, III; Capital letters: A, B,C; Arabic numerals: 1, 2, 3 (Review “Principles of Outlining” on ps, 266-267.) B. Remember to first state your Purpose in a complete sentence: This is what you want the audience to know or do upon completion of your speech. (See example outlines on ps. 274-280 and p. 315 for examples of specific kinds of purpose statements.) C. Label Introduction, Body, and Conclusion with NO SYMBOLS in front of the labels. D. Remember to have a References section listing the sources you used in correct MLA form at the end of your sentence outline. You do not have to put it on a separate sheet. 1. Alphabetize sources according to last name of the author or first word of title if no author is given. 2. Look at ps. 323 and 325 to see what this section is supposed to look like because indentation is involved. 3. There are several instruments that will put your source citation into correct MLA form when you fill in the required information. Some are: a. Microsoft Word 2007 program feature b. www.easybib...

Words: 1294 - Pages: 6

Free Essay

Note

...FIVE NOTETAKING METHODS Notetaking Great note-taking takes practice. You have to find a method that works for you, and that may change depending on the class that you’re in (for example, a science class versus a humanities class). Here are 5 methods that are proven to be successful. Read over each one and decide if there’s one that might work for you. These styles are described in the format you would use to take notes in class. You might find that a comfortable method is a combination of 2 or more of the ones listed here, and that’s fine. Figure out what works for you and stick with it! Page # Layout of the page and where to write THE CORNELL METHOD Today’s Date You physically draw a line vertically down your paper, leaving 2.5 inches on the left and 6 inches on the right. This allows you to take notes on the right-hand side of the page leaving space on the left to summarize the main point with a cue word or phase. When the instructor moves to a new topic, skip a line. It is also a great idea to use some organizational structure to your whole page. Use bullets!  Use an indented system – kind of like outlining You can underline important words. If you aren’t able to completely write down an idea before the instructor moves on to a new topic, fill it in after class. After class, test your knowledge of course material by covering up the right side of the page, reading the cue words, and trying to remember as much information as possible. Then check to see if you remembered...

Words: 887 - Pages: 4